rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
885 stars 209 forks source link

Get rid of NULL #194

Closed neheb closed 5 years ago

neheb commented 5 years ago

nullptr is the C++11 replacement for NULL. Found with -Wzero-as-null-pointer-constant .

Also changed a few C headers to use the C++ versions as the C headers cause the same warning to be emitted.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.02%) to 17.857% when pulling 2e976de7e0d82b0bdac73c3d6a475a9490664392 on neheb:neh into 756f70010779927dc0691e1e722ed433d5d295e1 on rakshasa:master.

rakshasa commented 5 years ago

Two things; first, LLVM has an amazing tool to update code to c++11++ automatically.

Second, doing this will break all patches so not happening now. I'll be upgrading the code when more stuff has been merged.