arvidn
65fef972a2
apply some c++11 modernization
2018-01-11 04:51:39 -05:00
pavel.pimenov
5a772325a0
redundant is_finished(block.block)
2018-01-09 03:20:28 -05:00
arvidn
6785046c2f
introduce a download_priority_t type, for uniform an type-safe piece- and file priorities
2017-11-02 08:20:21 +01:00
arvidn
50bef25786
make the piece-picker less two-phase initialized
2017-10-26 23:39:15 +02:00
arvidn
330904f460
convert picker_flags_t to type safe flags
2017-07-23 09:29:25 -07:00
Alden Torres
f6ca04638c
added const and auto refactor in torrent, piece_picker
2017-06-20 13:20:12 -04:00
arvidn
480bde9333
change formatting of namespace declarations
2017-04-12 14:26:35 -04:00
Arvid Norberg
8cf6e9e37c
use span<> to return the block_info for a piece ( #1777 )
...
use span<> to return the block_info for a piece to improve range checks and loops
2017-03-04 23:45:07 -05:00
Alden Torres
4d5ddc90f5
fixing sign-conversion warnings, part 14, minor refactor
2017-02-10 15:27:49 -05:00
Alden Torres
3803661863
moved alloca.hpp to private aux_ and size refactor ( #1634 )
...
moved alloca.hpp to private aux_ and size refactor
2017-01-27 12:43:34 -05:00
Arvid Norberg
6a701437b6
use strong_typedef for peer_class_t type ( #1595 )
...
use strong_typedef for peer_class_t type
2017-01-21 22:40:19 -05:00
Arvid Norberg
f1e34dfbd5
remove long-standing deprecated filter_pieces functions ( #1457 )
...
remove long-standing deprecated filter_pieces functions
2016-12-27 12:42:23 -08:00
Arvid Norberg
42a27b3ebc
introduce a prio_index_t type ( #1453 )
...
* introduce a prio_index_t type for indexing into the priority sorted piece list, m_pieces, in piece_picker
* some piece picker simplification
* fix msvc warning for prio_index_t
2016-12-26 08:25:50 -08:00
Arvid Norberg
3f1084d63d
strengthened type safety in handling of piece and file indices ( #1409 )
...
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
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