1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-23 14:40:43 +00:00
transmission/libtransmission/README.md
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

15 lines
712 B
Markdown

# 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()` and `constexpr` 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, use `std::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?