ValueType: Refactoring

This commit is contained in:
Daniel Marjamäki 2016-05-08 17:42:53 +02:00
parent 803b4d4cf8
commit e355e4ac78
1 changed files with 5 additions and 5 deletions

View File

@ -4418,11 +4418,11 @@ std::string ValueType::str() const
ret += " long double"; ret += " long double";
else if (type == NONSTD && typeScope) { else if (type == NONSTD && typeScope) {
std::string className(typeScope->className); std::string className(typeScope->className);
const Scope *s = typeScope; const Scope *scope = typeScope->nestedIn;
while (s->nestedIn && s->nestedIn->type != Scope::eGlobal) { while (scope && scope->type != Scope::eGlobal) {
s = s->nestedIn; if (scope->type == Scope::eClass || scope->type == Scope::eStruct || scope->type == Scope::eNamespace)
if (s->type == Scope::eClass || s->type == Scope::eStruct || s->type == Scope::eNamespace) className = scope->className + "::" + className;
className = s->className + "::" + className; scope = scope->nestedIn;
} }
ret += ' ' + className; ret += ' ' + className;
} }