transmission/libtransmission
Charles Kerr 3b72a1feea
refactor: use C++ inheritance for tr_peer, tr_peerMsgs, and tr_webseed (#1877)
* refactor: use C++ inheritance for tr_peer, tr_peerMsgs, and tr_webseed
2021-10-07 08:33:55 -05:00
..
CMakeLists.txt
ConvertUTF.c
ConvertUTF.h
README.md
announcer-common.h
announcer-http.cc
announcer-udp.cc
announcer.cc
announcer.h
bandwidth.cc
bandwidth.h
bitfield.cc
bitfield.h
blocklist.cc
blocklist.h
cache.cc
cache.h
clients.cc
clients.h
completion.cc
completion.h
crypto-utils-cyassl.cc
crypto-utils-fallback.cc
crypto-utils-openssl.cc
crypto-utils-polarssl.cc
crypto-utils.cc
crypto-utils.h
crypto.cc
crypto.h
error-types.h
error.cc
error.h
fdlimit.cc
fdlimit.h
file-posix.cc
file-win32.cc
file.cc
file.h
handshake.cc
handshake.h
history.h
inout.cc
inout.h
jsonsl.c
jsonsl.h
libt.dox
log.cc
log.h refactor: use nullptr instead of NULL (#1884) 2021-10-06 11:32:17 -05:00
magnet.cc
magnet.h
makemeta.cc
makemeta.h
metainfo.cc
metainfo.h
mime-types.h
mime-types.js
natpmp.cc
natpmp_local.h
net.cc
net.h refactor: prefer constexpr functions over static inline ones (#1887) 2021-10-06 17:24:04 -05:00
peer-common.h
peer-io.cc
peer-io.h
peer-mgr.cc
peer-mgr.h
peer-msgs.cc
peer-msgs.h
peer-socket.h
platform-quota.cc
platform-quota.h
platform.cc
platform.h
port-forwarding.cc
port-forwarding.h
ptrarray.cc
ptrarray.h
quark.cc
quark.h
resume.cc
resume.h
rpc-server.cc
rpc-server.h
rpcimpl.cc
rpcimpl.h
session-id.cc
session-id.h refactor: prefer "using" over "typedef" (#1883) 2021-10-06 09:26:07 -05:00
session.cc
session.h
stats.cc
stats.h
subprocess-posix.cc
subprocess-win32.cc
subprocess.h
torrent-ctor.cc
torrent-magnet.cc
torrent-magnet.h
torrent.cc
torrent.h
tr-assert.cc
tr-assert.h
tr-dht.cc
tr-dht.h
tr-getopt.cc
tr-getopt.h
tr-lpd.cc
tr-lpd.h
tr-macros.h
tr-udp.cc
tr-udp.h
tr-utp.cc
tr-utp.h
transmission.h
trevent.cc
trevent.h
upnp.cc
upnp.h
utils.cc
utils.h
variant-benc.cc
variant-common.h
variant-json.cc
variant.cc
variant.h
verify.cc
verify.h
version.h.in
watchdir-common.h
watchdir-generic.cc
watchdir-inotify.cc
watchdir-kqueue.cc
watchdir-win32.cc
watchdir.cc
watchdir.h
web.cc
web.h
webseed.cc
webseed.h
wildmat.c

README.md

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?