diff options
| author | hjk <hjk@qt.io> | 2019-07-31 17:21:41 +0200 |
|---|---|---|
| committer | hjk <hjk@qt.io> | 2019-08-01 13:20:26 +0000 |
| commit | 2e14df7561ee10c7a408bd3ebb4944016ecdd1f4 (patch) | |
| tree | 4a220241720e8a307fb96e98941656cf7b9f940d /src/libs/cplusplus/PreprocessorEnvironment.cpp | |
| parent | 630385751a806b64d41295ee50957e2a9138a193 (diff) | |
Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/libs/cplusplus/PreprocessorEnvironment.cpp')
| -rw-r--r-- | src/libs/cplusplus/PreprocessorEnvironment.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/cplusplus/PreprocessorEnvironment.cpp b/src/libs/cplusplus/PreprocessorEnvironment.cpp index 6d7464d7993..4ffc127a19d 100644 --- a/src/libs/cplusplus/PreprocessorEnvironment.cpp +++ b/src/libs/cplusplus/PreprocessorEnvironment.cpp @@ -67,10 +67,10 @@ static unsigned hashCode(const char *str, int length) Environment::Environment() : currentLine(0), hideNext(false), - _macros(0), + _macros(nullptr), _allocated_macros(0), _macro_count(-1), - _hash(0), + _hash(nullptr), _hash_count(401) { } @@ -153,10 +153,10 @@ void Environment::reset() if (_hash) free(_hash); - _macros = 0; + _macros = nullptr; _allocated_macros = 0; _macro_count = -1; - _hash = 0; + _hash = nullptr; _hash_count = 401; } @@ -230,14 +230,14 @@ Environment::iterator Environment::lastMacro() const Macro *Environment::resolve(const ByteArrayRef &name) const { if (! _macros) - return 0; + return nullptr; Macro *it = _hash[hashCode(name.start(), name.size()) % _hash_count]; for (; it; it = it->_next) { if (it->name() != name) continue; else if (it->isHidden()) - return 0; + return nullptr; else break; } return it; |
