Commit Graph

33 Commits

Author SHA1 Message Date
arvidn 23ba9d12d1 construct and destruct objects in stack allocations (alloca()) 2017-04-28 21:34:31 -04:00
arvidn 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
Arvid Norberg b8e77444d5 use span for read_resume_data() (#1867)
use span for read_resume_data()
2017-03-29 16:10:32 -04:00
Andrei Kurushin 8cd0bb6eb3 optimize bdecode_node offset calculation (#1767)
optimize bdecode_node offset calculation
2017-03-05 10:45:27 -05:00
pavel.pimenov 78442e9a2c bdecode_node - add const 2017-02-27 19:44:12 -05:00
Alden Torres 2437b3c134 created aux::typed_span and related refactor 2017-01-28 23:28:38 -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
Alden Torres 2bc7a60f33 fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor (#1616)
fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor
2017-01-26 08:31:20 -05:00
Alden Torres 4ddd4b72c6 fixing sign-conversion warnings, part 7 (#1604)
fixing sign-conversion warnings, part 7
2017-01-24 01:35:17 -05:00
Alden Torres f382936d56 headers, end of file, code cleanup 2016-12-12 23:36:45 -05:00
Alden Torres a05f0ba8a4 refactor for more modern struct initialization and use of api 2016-12-12 02:15:27 -05:00
Alden Torres 3a92908f39 formatting, added std:: and spaces 2016-12-10 23:11:43 -05:00
Alden Torres 37cbdc5b37 fixing shorten-64-to-32 warnings, part 1 2016-12-05 00:22:17 -05:00
Alden Torres 86251adb1b more fixes of integral type conversion warnings 2016-11-21 20:22:18 -05: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 cebd976cc2 fix error_code vs. error_condition traits (#1169)
fix error_code vs. error_condition traits. deprecate get_*_category(), instead use *_category()
2016-10-02 12:27:50 -07:00
Arvid Norberg e36e5efaba use boost::string_ref (#996)
use boost::string_ref/boost::string_view in various parts of the code, in file_storage, some file functions and in bdecode.
2016-08-13 07:04:53 -04:00
arvidn 231dffd392 fix whitespace 2016-08-08 18:16:05 -04:00
Arvid Norberg 9c2325ff6b modernize and improve type-safety of the DHT put implementation and test (#929)
modernize and improve type-safety of the DHT put implementation and tests. use unique_ptr instead of malloc for dht put items.
2016-07-23 15:57:04 -07:00
Arvid Norberg 8c03718117 apply modernization transforms to headers too. nullptr, explicit constructors, = default (#903) 2016-07-10 14:27:42 -04:00
Arvid Norberg e782783814 modernize use override (#895) 2016-07-09 20:10:38 -04:00
Arvid Norberg 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -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
Alden Torres db65eb320a making dht counters additive (#783)
make dht counters additive to support both IPv4 and IPv6
2016-06-04 14:04:29 -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 98bbeb68b8 transition some standard integer types from boost to std (#711) 2016-05-08 16:10:49 -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
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn a91e7ce25d fix warnings 2015-08-06 02:30:06 -04:00
arvidn 52b4aed466 merge bdecode patch from RC_1_0. an empty string now produces an error rather than an empty bdecoded struct 2015-07-30 21:29:22 -04:00
Arvid Norberg d8c0632c78 add some bdecoding unit tests 2015-06-02 03:06:48 +00:00
Arvid Norberg 2fff222235 silence some warnings on msvc 2015-04-27 02:21:12 +00:00
Arvid Norberg 6c1df7eb55 landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node 2015-03-12 05:20:12 +00:00