Fixed Cppcheck warning about using const reference to avoid data copying
This commit is contained in:
parent
a0a04be011
commit
c7c9b3cd65
|
@ -3670,7 +3670,7 @@ const Enumerator * SymbolDatabase::findEnumerator(const Token * tok) const
|
||||||
{
|
{
|
||||||
const Scope * scope = tok->scope();
|
const Scope * scope = tok->scope();
|
||||||
|
|
||||||
const std::string tokStr = tok->str();
|
const std::string &tokStr = tok->str();
|
||||||
|
|
||||||
if (tokensThatAreNotEnumeratorValues.find(tokStr) != tokensThatAreNotEnumeratorValues.end()) {
|
if (tokensThatAreNotEnumeratorValues.find(tokStr) != tokensThatAreNotEnumeratorValues.end()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in New Issue