From 2e14df7561ee10c7a408bd3ebb4944016ecdd1f4 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 31 Jul 2019 17:21:41 +0200 Subject: Some clang-tidy -use-modernize-nullptr Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann --- src/libs/qmljs/qmljsscopebuilder.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libs/qmljs/qmljsscopebuilder.cpp') diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp index 7b071662b9..ca59e74dca 100644 --- a/src/libs/qmljs/qmljsscopebuilder.cpp +++ b/src/libs/qmljs/qmljsscopebuilder.cpp @@ -67,8 +67,8 @@ void ScopeBuilder::push(AST::Node *node) if (!_scopeChain->qmlScopeObjects().isEmpty() && name.startsWith(QLatin1String("on")) && !script->qualifiedId->next) { - const ObjectValue *owner = 0; - const Value *value = 0; + const ObjectValue *owner = nullptr; + const Value *value = nullptr; // try to find the name on the scope objects foreach (const ObjectValue *scope, _scopeChain->qmlScopeObjects()) { value = scope->lookupMember(name, _scopeChain->context(), &owner); @@ -217,19 +217,19 @@ void ScopeBuilder::setQmlScopeObject(Node *node) const Value *ScopeBuilder::scopeObjectLookup(AST::UiQualifiedId *id) { // do a name lookup on the scope objects - const Value *result = 0; + const Value *result = nullptr; foreach (const ObjectValue *scopeObject, _scopeChain->qmlScopeObjects()) { const ObjectValue *object = scopeObject; for (UiQualifiedId *it = id; it; it = it->next) { if (it->name.isEmpty()) - return 0; + return nullptr; result = object->lookupMember(it->name.toString(), _scopeChain->context()); if (!result) break; if (it->next) { object = result->asObjectValue(); if (!object) { - result = 0; + result = nullptr; break; } } @@ -255,5 +255,5 @@ const ObjectValue *ScopeBuilder::isPropertyChangesObject(const ContextPtr &conte return prototype; } } - return 0; + return nullptr; } -- cgit v1.2.1