diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 2d5b8519f..bfc3fd02f 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -3670,7 +3670,7 @@ const Enumerator * SymbolDatabase::findEnumerator(const Token * tok) const { const Scope * scope = tok->scope(); - const std::string tokStr = tok->str(); + const std::string &tokStr = tok->str(); if (tokensThatAreNotEnumeratorValues.find(tokStr) != tokensThatAreNotEnumeratorValues.end()) { return nullptr;