* test: improve coverage in tr_bitfield::raw()
* test: improve coverage in tr_bitfield::count()
* test: improve coverage for edge cases in tr_bitfield::setSpan()
* test: confirm that excess bits in setRaw() are set to zero
* fix: edge case of tr_block_info::initBlocks() where piece_size is 0
this should not happen in production, but cover it anyway
* refactor: fix uninit var warnings in ptrarray
* refactor: fix uninit var warnings in bitfield
* refactor: fix uninit var warnings in handshake
* refactor: fix uninit var warnings in tr-dht
* refactor: fix uninit var warnings in natpmp
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Modernize bitfield.cc: Storage changed to vector of bytes, return vector from getRaw, new Span readonly memory view
Modernize bitfield.cc: Code style/review notes
Modernize bitfield.cc: Code format
* Modernize bitfield.cc: Swap end and begin in bit counting code assertion
* Modernize bitfield.cc: Rewrite states and simplify code
* Modernize bitfield.cc: Fixing the code and tests
* Modernize bitfield.cc: Fixing tests
* Modernize bitfield.cc: Formatting; +std::size, +const
* Modernize bitfield.cc: Grouped member functions into the struct; C++ construction
* Modernize bitfield.cc: Naming style similar to qt/ C++ source
* Modernize bitfield.cc: Bitfield test updated to new API
* Modernize bitfield.cc: Renames for private functions
* Modernize bitfield.cc: Formatting
* Modernize bitfield.cc: Remove struct in 'struct Bitfield' and update commented code too
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* C++ modernize: Replace MIN/MAX with type safe std::min/std::max
* Template std::min/max invocations now explicitly use largest integer type
* torrent.cc did not have <algorithm> included
* MIN/MAX Changes for subprocess-win32.cc
* Using type{} style cast instead of template parameter in std::min/max
* 32-bit type cast errors with uint64_t versus size_t
* 32-bit type cast errors inout.cc and file.cc
* Missing include in windows code; Type cast error fixed
* Missing macro in win32 daemon; Replaced MIN in commented code with std::min
* Update libtransmission/tr-getopt.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Update libtransmission/file-posix.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Update tests/libtransmission/copy-test.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Update libtransmission/peer-mgr.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Strlen returns size_t, remove cast
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization
patches!
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00
Renamed from libtransmission/bitfield.c (Browse further)