* fix: operator== should return bool in tr_strbuf
Fixes build error with C++20/C++23
error: return type 'auto' of selected 'operator==' function for rewritten '!=' comparison is not 'bool'
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: explicitly specify Blocklist::size() return type as size_t
Fixes building with C++20/C++23
error: no matching function for call to 'size'
function 'size' with deduced return type cannot be used before it is defined
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: wrap runtime format strings with fmt::runtime in library, daemon and cli
fmt::format_string ctor is consteval with C++20
See https://github.com/fmtlib/fmt/issues/2438
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: wrap runtime format strings with fmt::runtime for GTK client
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: allow to override C and CXX standard via cmdline or env
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: add job to check if transmission compiles with C++23
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* Address code review by mikedld
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix new found fmt build errors
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* Address code review by tearfur
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: make tr_net_init_mgr singleton buildable with C++23
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
---------
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* Add CI configuration for clang-tidy on Windows
* Fix issues reported by clang-tidy on Windows
* Workaround clang-tidy defects on Windows
* Fix C-style casts (which clang-tidy didn't report)
* refactor: move tr_preallocation_mode info tr_open_files
* refactor: remove unnecessary error nullptr check
* refactor: use snake_case for private method names in inout.cc
* refactor: extract-method get_fd() from read_or_write_bytes()
* refactor: make function args const where possible
* refactor: simplify read_or_write_bytes()
* refactor: make buflen a uint64_t in read_or_write_piece()
* refactor: move tr_torrentStop() logic from read_or_write_piece() to tr_ioWrite()
* refactor: make tr_ioFoo() functions take a const torrent
* refactor: make tr_cache::close_torrent_files() take a tor_id instead of a torrent
* refactor: remove the tr_error** idiom
* fix: tr_error::message() is only constexpr in c++20 and up
* chore: silence a couple of g++-12 Wshadow warnings