From c7c9b3cd653c11bb682bda58eef6743bba0f4ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 15 Jan 2018 22:31:15 +0100 Subject: [PATCH] Fixed Cppcheck warning about using const reference to avoid data copying --- lib/symboldatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;