COMP: Use nullptr instead of 0 or NULL

The check converts the usage of null pointer constants (eg. NULL, 0) to
use the new C++11 nullptr keyword.

SRCDIR=/Users/johnsonhj/src/jsoncpp #My local SRC
BLDDIR=/Users/johnsonhj/src/jsoncpp/cmake-build-debug/ #My local BLD

cd /Users/johnsonhj/src/jsoncpp/cmake-build-debug/
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,modernize-use-nullptr  -header-filter=.* -fix
This commit is contained in:
Hans Johnson
2018-12-12 13:41:06 -06:00
parent 6219eae304
commit f64244ed3f
7 changed files with 46 additions and 46 deletions

View File

@@ -221,7 +221,7 @@ private:
Location end,
unsigned int& unicode);
bool
addError(const JSONCPP_STRING& message, Token& token, Location extra = 0);
addError(const JSONCPP_STRING& message, Token& token, Location extra = nullptr);
bool recoverFromError(TokenType skipUntilToken);
bool addErrorAndRecover(const JSONCPP_STRING& message,
Token& token,