mirror of
https://github.com/transmission/transmission
synced 2025-01-20 05:49:11 +00:00
4c1b627647
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>
712 B
712 B
Notes on the C-to-C++ Conversion
-
libtransmission was written in C for fifteen years, so eliminating all Cisms is nearly impossible. Modernization patches are welcomed but it won't all happen overnight.
tr_strdup()
andconstexpr
wil exist side-by-side in the codebase for the forseeable future. -
It's so tempting to refactor all the things! Please keep modernization patches reasonably focused so that they will be easy to review.
-
Prefer
std::
tools over bespoke ones. For example, usestd::vector
instead of tr_ptrArray. Redundant bespoke code should be removed. -
Consider ripple effects before adding C++ into public headers. Will it break C code that #includes that header?