Charles Kerr
a79a868257
refactor: make tr_variantFromBuf() public ( #2187 )
...
* refactor: add tr_variantFromBuf() and support inplace json/benc parsing
2021-11-17 23:37:35 -06:00
Charles Kerr
1ba81938bf
refactor: use std::string_view in benc parser ( #2182 )
...
* refactor: use std::string_view to parse benc
* refactor: simplify private parsing API in variant.cc
* chore: remove unneeded includes
* refactor: merge tr_variantFromBenc and tr_variantFromBencFull
2021-11-16 21:29:30 -06:00
Charles Kerr
be22677f10
refactor: prefer string_view over raw char* ( #2097 )
2021-11-05 01:29:19 -05:00
Charles Kerr
c472cbd88d
refactor: only use [[maybe_unused]] if arg might be used ( #2033 )
...
* refactor: [[maybe_unused]] iff arg _might_ be used
If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
2021-10-24 11:41:54 -05:00
Charles Kerr
236a0965fa
refactor: tr_variant*Str() functions now take a std::string_view ( #1990 )
...
* refactor tr_variant*Str functions now take a std::string_view
* refactor: tr_torrentPrimaryMimeType returns a string-view
2021-10-19 21:30:50 -05:00
Charles Kerr
16e9a99fe9
refactor: clang-tidy --fix modernize-deprecated-headers ( #1980 )
2021-10-17 15:17:18 -05:00
Charles Kerr
23d85458f8
fix: cppcoreguidelines-init-variables pt. 3 ( #1954 )
...
* refactor: fix uninitialized variable warnings in variant code
* refactor: fix uninitialized variable warnings in web, webseed
2021-10-15 12:27:12 -05:00
Charles Kerr
567f1e48c8
tr_quark_new() now takes a std::string_view ( #1961 )
2021-10-15 08:28:47 -05:00
Charles Kerr
ab82e155be
build: add clang tidy modernize loop convert ( #1949 )
...
* build: add clang-tidy check modernize-pass-by-value
* build: add clang-tidy check modernize-loop-convert
* refactor: constexpr
* refactor: make preallocGuess a std::array
2021-10-14 10:36:49 -05:00
Charles Kerr
1fb5a79813
refactor: use maybe unused attribute ( #1918 )
...
* refactor: replace TR_UNUSED with [[maybe_unused]]
2021-10-10 11:52:26 -05:00
Charles Kerr
e2f0432146
in variant-json, use std::deque not tr_ptrArray ( #1850 )
2021-09-28 08:56:46 -05:00
Charles Kerr
643074e7bb
refactor: use std::list in variant-json.cc ( #1842 )
...
* refactor: replace tr_list with std::deque in variant-json.cc struct ParentState
2021-09-27 07:46:38 -05:00
Dmytro Lytovchenko
43d1ece562
C++ modernization: Replace NULLs with typesafe nullptrs ( #1799 )
...
Fixing CI errors and build errors
Reverted changes: NULL in EV_SET macro; Clang-formatting
Reverted changes: MacosX *.m files reverted from master
2021-09-14 19:18:09 -05:00
Charles Kerr
4c1b627647
refactor: port libtransmission to C++ ( #1787 )
...
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