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

@@ -108,8 +108,8 @@ char const* ValueIteratorBase::memberName() const {
char const* ValueIteratorBase::memberName(char const** end) const {
const char* cname = (*current_).first.data();
if (!cname) {
*end = NULL;
return NULL;
*end = nullptr;
return nullptr;
}
*end = cname + (*current_).first.length();
return cname;