Commit Graph

315 Commits

Author SHA1 Message Date
Alden Torres 22b596945e enable /W4 warnings for msvc 2016-12-13 19:36:14 -05:00
Alden Torres 3a92908f39 formatting, added std:: and spaces 2016-12-10 23:11:43 -05:00
Alden Torres e1dcf82e2a fixing shorten-64-to-32 warnings, part 3 2016-12-08 20:22:34 -05:00
arvidn 09b5cfd688 remove build option to use narrower types in piece_picker (optimize_memory_usage) 2016-11-29 08:11:51 -05:00
Alden Torres d5c4cd7280 fixed sign-compare warnings and some refactor (#1354)
fixed sign-compare warnings and some refactor. make sequence_number backed by std::int64_t
2016-11-27 08:46:53 -05:00
Alden Torres c30027e4a1 more integral type conversion warning fixes, now only needs shorten-64-to-32 (#1349)
more integral type conversion warning fixes, now only needs shorten-64-to-32
2016-11-25 11:17:25 -05:00
Arvid Norberg 5f3c52f406 transition to more default member initializers (#1261) 2016-10-26 20:41:57 -04:00
Steven Siloti a6e5ba8804 return a span from TORRENT_ALLOCA (#1244)
return a span from TORRENT_ALLOCA

Unfortunately this requires moving the variable declaration inside the macro.
Due to alloca’s unique properties pretty much the only safe way to call it is
in a simple assign-to-pointer expression. Therefor we need to use a temporary
pointer to store the value returned from alloca before we can call span’s ctor.

This also causes double evaluation of the size parameter which is unfortunate,
but no current callers of TORRENT_ALLOCA have a problem with this. Passing
expressions with side effects to macros is bad mojo anyways.
2016-10-22 14:43:40 -04:00
Arvid Norberg 8bb7aa62ae generalize and improve http redirect support for web seeds (#1060)
generalize and improve http redirect support for web seeds
2016-10-02 23:08:03 -07:00
Arvid Norberg d2002c5248 separate piece_block and has_block out to their own headers (#1148) 2016-09-24 08:46:56 -07:00
Alden Torres e11f233086 minor cleanup/refactor (#1062) 2016-09-04 18:24:20 -04:00
Alden Torres 2f7adfbb92 no more deprecated std::random_shuffle (#999)
replace deprecated std::random_shuffle. more aggressive random_shuffle in DHT simulation setup. use travis_retry.
2016-08-14 19:48:31 -04:00
Arvid Norberg e9a7271aca add piece picker test for re-prioritizing downloading/writing/partial pieces (#989)
add piece picker test for re-prioritizing partial pieces and forward port steven's piece picker fix from RC_1_1
2016-08-07 16:05:20 -04:00
Arvid Norberg 71f5510d62 make the random function produce proper random distributions, based o… (#981)
make the random function produce proper random distributions, based on uniform_int_distribution of C++11. also clean up piece_picker's priority_range to return two results instead of taking pointers to out-parameters. fix recent pe-crypto regression exposed by this change
2016-08-06 13:18:48 -04:00
Arvid Norberg caa034b1ac fix typo and add invariant check to piece_picker (#977)
fix typo and add invariant check to piece_picker
2016-08-02 07:20:13 -04:00
Alden Torres e55a310e79 use of BOOST_FALLTHROUGH, typos and minor cleanup 2016-08-01 11:42:18 -04:00
Arvid Norberg 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -04:00
Arvid Norberg 1facf0eef6 clean-up more defines (#872)
clean-up more defines. remove TORRENT_DEBUG and TORRENT_DISABLE_INVARIANT_CHECKS (instead use TORRENT_USE_ASSERTS and TORRENT_USE_INVARIANT_CHECKS)
2016-07-01 19:46:59 -04:00
Arvid Norberg 31b2a03005 some optimizations (#858)
allow disk I/O callback objects to be moved into disk io jobs
2016-06-27 01:02:00 -04:00
Arvid Norberg 6aabe3762b general modernization (#836)
general modernization. use nullptr instead of NULL, use std::tuple instead of boost::tuple, transition some unordered set/map from boost to std. some clean-up of includes
2016-06-20 11:32:06 -04:00
Arvid Norberg ed077c8358 use cstdint intead of boost/cstdint.hpp (#833)
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg 96999ad67f replace uses of boost::bind with std::bind and lambdas (#745) 2016-05-25 00:31:52 -04:00
Arvid Norberg 748af6eec1 general cleanup. remove valgrind markup, log_hash_failures and C headers (#752)
general cleanup. remove valgrind markup, log_hash_failures and C headers
2016-05-23 08:15:39 -04:00
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00
Arvid Norberg a7213d3f5a don't support older than msvc-14 (2015) (#727)
don't support older than msvc-14 (2015)
2016-05-12 21:24:45 -04:00
Arvid Norberg c91a700c07 Msvc warnings (#685)
fix msvc warnings and build examples with warnings-as-errors
2016-05-02 12:36:21 -04:00
Arvid Norberg c557432431 attempt to run cppcheck on travis (#644)
run cppcheck on travis
2016-04-26 18:09:11 -04:00
Andrei Kurushin 62eb956c54 fix x64 build with VS2015 UP2 compiler (#640)
fix VS2015 compiler warnings for: address-model=64, deprecated-functions=on, link=shared
2016-04-25 17:22:09 -04:00
Andrei Kurushin 7b5d48c02a fix default release build with VS2015 UP2 compiler warnings (#624)
* fix default release build with VS2015 UP2 compiler warnings
this will allow to successfully build:
bjam toolset=msvc-14.0 release deprecated-functions=off character-set=unicode link=static warnings-as-errors=on
2016-04-17 16:56:07 -04:00
arvidn cee2b16949 fix some coverity warnings and move out code to torrent_status.cpp 2016-04-07 21:44:24 -04:00
arvidn 387498e54f clean up in piece picker 2016-04-06 00:45:21 -04:00
arvidn 07ecf7c1bd remove invalid assert 2016-02-27 00:25:21 -05:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn fd3b53604c add new piece picker logging alert category 2015-11-29 08:25:55 -05:00
arvidn 2626159abe use a consistent random number generator to make simulations deterministic 2015-11-12 00:21:56 -05:00
arvidn a48cb785d0 forward port piece_block patch from RC_1_0 2015-11-07 18:50:54 -05:00
arvidn fa450b4bf7 attempt to fix invalid vector subscript bug in piece_picker 2015-08-20 21:37:22 +02:00
arvidn ffa870d280 fixed some GCC warnings 2015-08-20 01:33:20 +02:00
arvidn f6b86dc4b5 add typesafety to piece_picker torrent_peer pointers. and fix a few incorrect uses 2015-08-18 04:25:13 -04:00
arvidn 9a0092c120 fix some warnings 2015-08-16 12:17:23 -04:00
arvidn a81ca2391b fix some warnings 2015-08-10 20:03:24 -04:00
arvidn 6068418def fix and re-enable simulations 2015-08-09 00:56:37 -04:00
arvidn 655a3ae019 fix some warnings 2015-08-01 23:57:11 -04:00
arvidn d1670c72c2 removed sparse-regions support 2015-06-29 20:40:32 -04:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg 607e708bc4 fix warnings 2015-05-19 03:13:49 +00:00
Arvid Norberg 4a304273fd fix some coverity issues 2015-05-03 03:28:39 +00:00
Arvid Norberg ab0c97755e merged fixes from RC_1_0 2015-04-29 05:48:09 +00:00
Arvid Norberg 0d72163a56 fix coverity warnings 2015-04-29 05:46:35 +00:00
Arvid Norberg f0336017d1 fix gcc warnings and missing header files in makefiles 2015-04-26 00:51:44 +00:00