Some clang-tidy -use-modernize-nullptr

Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
hjk
2019-07-31 17:21:41 +02:00
parent 630385751a
commit 2e14df7561
180 changed files with 1312 additions and 1312 deletions

View File

@@ -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;