From e355e4ac78c86623799ae7506a402e4f90b87c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 8 May 2016 17:42:53 +0200 Subject: [PATCH] ValueType: Refactoring --- lib/symboldatabase.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 2f5350ee1..a377d469b 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -4418,11 +4418,11 @@ std::string ValueType::str() const ret += " long double"; else if (type == NONSTD && typeScope) { std::string className(typeScope->className); - const Scope *s = typeScope; - while (s->nestedIn && s->nestedIn->type != Scope::eGlobal) { - s = s->nestedIn; - if (s->type == Scope::eClass || s->type == Scope::eStruct || s->type == Scope::eNamespace) - className = s->className + "::" + className; + const Scope *scope = typeScope->nestedIn; + while (scope && scope->type != Scope::eGlobal) { + if (scope->type == Scope::eClass || scope->type == Scope::eStruct || scope->type == Scope::eNamespace) + className = scope->className + "::" + className; + scope = scope->nestedIn; } ret += ' ' + className; }