From 70368a2e3a118a6b7bcd5122f9dbaac9b7a3f54b Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sat, 29 Aug 2015 11:13:03 +0200 Subject: [PATCH] Made ctor of triplet explicit, because cppcheck demands it. --- lib/tokenize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 61763ccff..e5ed0de59 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -9489,7 +9489,7 @@ void Tokenizer::simplifyMicrosoftMemoryFunctions() namespace { struct triplet { triplet(const char* t, const char* m, const char* u) : tchar(t), mbcs(m), unicode(u) {} - triplet(const std::string& t) : tchar(t) {} + explicit triplet(const std::string& t) : tchar(t) {} bool operator <(const triplet& rhs) const { return tchar < rhs.tchar; } @@ -9540,7 +9540,7 @@ void Tokenizer::simplifyMicrosoftStringFunctions() const bool ansi = _settings->platformType == Settings::Win32A; for (Token *tok = list.front(); tok; tok = tok->next()) { - std::set::const_iterator match = apis.find(tok->str()); + std::set::const_iterator match = apis.find(triplet(tok->str())); if (match!=apis.end()) { const std::string pattern(match->tchar + " ("); if (Token::simpleMatch(tok, pattern.c_str())) {