Made ctor of triplet explicit, because cppcheck demands it.

This commit is contained in:
PKEuS 2015-08-29 11:13:03 +02:00
parent d5bc3285b9
commit 70368a2e3a
1 changed files with 2 additions and 2 deletions

View File

@ -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<triplet>::const_iterator match = apis.find(tok->str());
std::set<triplet>::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())) {