Charles Kerr
656df477f2
refactor: add tr_announce_list ( #2308 )
...
* refactor: add tr_announce_list (#2308 )
2021-12-14 14:59:40 -06:00
Charles Kerr
bfbca961d4
refactor: remove assigned-but-unused tr_info.originalName ( #2276 )
2021-12-07 00:37:34 -06:00
Charles Kerr
34881f6295
refactor: make parts of tr file private ( #2241 )
...
* refactor: make parts of tr_file private
2021-11-27 21:17:47 -06:00
Charles Kerr
f7b729a350
refactor: add tr_buildTorrentFilename() ( #2196 )
...
a simpler API for building .torrent and .resume filenames
2021-11-19 18:36:25 -06:00
Charles Kerr
f14e741052
fix: some sonarcloud warnings ( #2189 )
...
* fix: pass-large-object-by-reference-to-const warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0Gz8ze7dx8i2lkKEvq\&open\=AX0Gz8ze7dx8i2lkKEvq
* fix: use-std-array-instead-of-C-array warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qcgUnpKTxYiu5B-\&open\=AX0L8qcgUnpKTxYiu5B-
* fix: extract-assignment-from-expression
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qcgUnpKTxYiu5CH\&open\=AX0L8qcgUnpKTxYiu5CH
* fix: move-include-directives-to-top
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qlYUnpKTxYiu5CQ\&open\=AX0L8qlYUnpKTxYiu5CQ
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qcgUnpKTxYiu5CK\&open\=AX0L8qcgUnpKTxYiu5CK
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0WPlmBwxvzFbF6whWh\&open\=AX0WPlmBwxvzFbF6whWh
* fix: ensure-move-constructor-is-noexcept
https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0WPlWzwxvzFbF6whWU\&open\=AX0WPlWzwxvzFbF6whWU
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0bZP20jI_aUyxGBxCD\&open\=AX0bZP20jI_aUyxGBxCD
* fix: replace-redundant-type-with-auto
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0bZP0rjI_aUyxGBxCB\&open\=AX0bZP0rjI_aUyxGBxCB
* fix: make-parameter-const
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0gkQqqPDVGqE4PY-io\&open\=AX0gkQqqPDVGqE4PY-io
* fix: use-init-statement
https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0rARJbfJ-O-YIDS9xM\&open\=AX0rARJbfJ-O-YIDS9xM
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0WPlmBwxvzFbF6whWh\&open\=AX0WPlmBwxvzFbF6whWh
* fix: explicitly-delete-copy-ctor
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0gkQr6PDVGqE4PY-i4\&open\=AX0gkQr6PDVGqE4PY-i4
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0bZP9wjI_aUyxGBxCF\&open\=AX0bZP9wjI_aUyxGBxCF
2021-11-17 18:17:09 -06:00
Charles Kerr
d1f8c28fcd
refactor: make piece checksums private ( #2130 )
...
* refactor: remove tr_info.pieces
2021-11-12 10:42:51 -06:00
Charles Kerr
bdf1bb6d17
refactor: tr_strv*() util functions ( #2123 )
...
* feat: add tr_strv utils
2021-11-09 18:13:47 -06:00
Charles Kerr
d8b57fe4dc
refactor: web_utils ( #2121 )
...
* chore: move web utils from web, utils to web-utils
2021-11-08 21:30:03 -06:00
Charles Kerr
be22677f10
refactor: prefer string_view over raw char* ( #2097 )
2021-11-05 01:29:19 -05:00
Charles Kerr
75ce9eae7b
perf: minor perf improvements ( #2096 )
...
* perf: use avoid unnecessary strlen when making log messages
* perf: avoid temporary string alloc/free in tr_metainfoAppendSanitizedPathComponent()
2021-11-03 20:36:32 -05:00
Charles Kerr
feaf12a205
refactor: tr_urlIsValid*() now takes a std::string_view ( #2078 )
...
* refactor: tr_urlIsValid*() now take a string_view arg
2021-11-01 15:36:14 -05:00
Charles Kerr
d6032f829b
refactor: remove tr_piece struct ( #2059 )
...
* refactor: remove tr_piece struct
2021-10-29 13:24:30 -05:00
Charles Kerr
3ec312dee8
refactor: cppcoreguidelines-init-variables pt. 12 ( #2022 )
...
* refactor: cppcoreguidelines-init-variables pt. 12 (#2022 )
2021-10-24 12:40:15 -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
Daniel Kamil Kozar
77b11232f2
Add support for creating torrents with a source flag ( #443 )
...
* Add support for creating torrents with a source flag
* Add the source flag functionality for Mac OSX
* Source flag should be a part of the info dictionary
* Address review comments
* Rename "sourceFlag" to "source" since "Flag" is usually reserved for booleans.
* Free the "source" pointer in tr_metainfoFree.
* Add information about transmission-create argument to its manpage.
* Replace all occurences of "sourceFlag" with "source" and use "Source tag" in UI
* Settle on just "Source" in UI
* The last usage of "flag" hopefully bites the dust! ;-)
* Add a missing free for the source in tr_metainfoFree
* Add a "source" field to the torrent-get RPC method
* uncrustify
* Test for torrents having different infohashes due to different source flags.
This is the whole point of this feature, so it makes sense to test it.
* case is important
* try to incorporate the macosx xml changes
2021-10-18 18:05:39 -05:00
Charles Kerr
16e9a99fe9
refactor: clang-tidy --fix modernize-deprecated-headers ( #1980 )
2021-10-17 15:17:18 -05:00
Charles Kerr
7b423b7e0d
refactor: tr_utf8clean now takes a std::string_view ( #1967 )
2021-10-15 20:02:40 -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
83f21b8e0e
refactor: prefer constexpr functions over static inline ones ( #1887 )
...
* refactor: prefer constexpr functions over static inline ones
2021-10-06 17:24:04 -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