Commit Graph

108 Commits

Author SHA1 Message Date
arvidn 71c980957c fix entry assignment from bdecode_node and lazy_entry 2019-07-21 06:22:11 -07:00
Amir Abrams 7d00e80a7a Trivial, correct school spelling in comments 2019-07-14 11:42:07 -04:00
Arvid Norberg 57017e3ace noreturn attribute is standard in C++11 2019-02-27 17:11:15 +01:00
arvidn 1b2832e018 convert some for-loops into std algorithms 2018-11-27 19:43:01 +01:00
arvidn 8841c58435 improve interoperability between bdecode_node and entry (for encoding). Make it possible to construct an entry from a bdecode_node. move comparison operators out of entry to support implicit conversions from bdecode_node 2018-11-18 22:54:36 +01:00
arvidn 7538d68086 clean up integer_to_str() function 2018-11-17 17:21:06 +01:00
arvidn 1dc8c1c127 initialize bencoded ints with zero when constructed 2018-11-16 14:23:04 +01:00
arvidn 5383854768 make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts 2018-11-16 14:06:22 +01:00
Arvid Norberg 949867eca9 factor out some parts of print function for entry 2018-10-03 00:50:02 +02:00
Arvid Norberg 6724c1eec0 fix some warnings 2018-09-19 22:12:45 -07:00
arvidn 78a344bd8b merged RC_1_1 into master 2018-09-05 08:25:14 -07:00
arvidn 7c837be651 make the print function for entry actually be json-like. when logging bencode entries, print it all on a single line. add test for entry print function 2018-08-27 13:56:04 +02:00
arvidn d439c8729a qualify some assignment operators to disallow assignment to temporaries 2018-07-01 17:29:50 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
arvidn f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +02:00
arvidn aaf9304a3b update year in copyright header 2018-04-09 09:04:33 +02:00
arvidn fac9931eb6 fix noexcept marking on entry, and make move assignment 2018-01-04 19:34:42 -05:00
Alden Torres 7fe75dd1eb trivial code refactor in entry and string_util related code 2017-11-29 20:08:15 +01:00
arvidn 93bb84d94c some random cleanup 2017-09-13 08:28:46 +02:00
arvidn c4eb4c8b5f use span in torrent_info constructors and deprecate the redundant flags argument 2017-07-22 00:00:44 -07:00
Pavel Pimenov ea8c5b32da add reserve entry::to_string() (#2148) 2017-07-17 15:05:58 -07:00
arvidn 6967d17a42 make move constructors and move assignment operators noexcept 2017-06-01 23:42:15 +02:00
pavel.pimenov 781a35a210 use operator+=(char) 2017-06-01 16:21:27 +02:00
arvidn 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
Arvid Norberg 29db3de6c0 wrap most instances of throw, and terminate on builds where exceptions are disabled (#1639)
wrap most instances of throw, and terminate on builds where exceptions are disabled
2017-01-29 15:37:42 -05:00
Andrei Kurushin 393e705d5c refactor entry::dictionary_type (#1568)
consolidate conditional std::map string code
enable C++14 string_view std::map for VS2015
2017-01-19 18:08:39 -05:00
Alden Torres df6cb6a48d fixing sign-conversion warnings, part 4, minor refactor (#1549)
fixing sign-conversion warnings, part 4, minor refactor
2017-01-14 18:53:25 -05: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 48a647a169 String view entry (#1147)
make entry support string_view in its interface, and make it efficient when in in C++14
2016-09-24 06:10:54 -07:00
Alden Torres 9fd83aaa10 more use of std::shared_ptr (#1009)
more std::shared_ptr transition
2016-08-18 17:08:40 -04:00
Alden Torres f51e782905 using string_view in node::incoming_request and plugin::on_dht_request (#1001)
use string_view in node::incoming_request. changed plugin::on_dht_request to use string_view
2016-08-15 16:17:13 -04: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
Alden Torres 0b3c64ee87 added TORRENT_EXPORT to avoid link weak symbol warning (#975) 2016-08-02 00:15:26 -04:00
Alden Torres f57612b82d rename of aux::array_view to span (#933) 2016-07-22 09:31:42 -07:00
Arvid Norberg 7bf49c0a1c modernize hasher to use array_view (#931)
modernize hasher to use array_view as well as adding array_view support to entry
2016-07-22 07:29:39 -07: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
Arvid Norberg 8c8f5bb03b deprecated public to_hex() and from_hex() functions (#784) 2016-06-04 10:01:43 -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 584d74e2f0 fix union storage hacks (#670)
remove union storage hacks
2016-05-21 21:04:47 -04:00
Arvid Norberg 1e7e01c671 transition to system_error as the exception type (#730)
transition to system_error as the exception type
2016-05-15 00:33:06 -04:00
arvidn 6cf5ac9dd1 merged RC_1_1 into master 2016-05-06 01:08:05 -04:00
Arvid Norberg 985436636e added new preformatted type to bencode entry (#698)
added new preformatted type to bencode entry to support carrying a verbatim copy of an already bencoded subtree. This is to support saving torrents in resume data and create_torrent based on existing torrents, in order to preserve key order
2016-05-05 21:38:57 -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
Steven Siloti f0b92a2047 add move ctor to entry 2016-04-30 21:02:22 -07:00
Steven Siloti ff0675e64e use standard array container (#676) 2016-04-30 23:10:47 -04:00
arvidn 3f3b366ed5 be a bit more strict about when the STL containers need complete types (to make it build under GCC with concept checks enabled). add proper assignment operator to types used in STL containers 2016-02-21 11:29:01 -05:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn a81ca2391b fix some warnings 2015-08-10 20:03:24 -04:00
arvidn 50925d7652 fix some more warnings 2015-08-08 02:48:01 -04:00