MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getcodeforcfg

Method getcodeforcfg

test/testpreprocessor.cpp:98–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97
98 static std::string getcodeforcfg(const Settings& settings, ErrorLogger& errorlogger, const char* code, std::size_t size, const std::string &cfg, const std::string &filename, SuppressionList *inlineSuppression = nullptr)
99 {
100 std::map<std::string, std::string> cfgcode = getcode(settings, errorlogger, code, size, std::set<std::string>{cfg}, filename, inlineSuppression);
101 const auto it = cfgcode.find(cfg);
102 if (it == cfgcode.end())
103 return "";
104 return it->second;
105 }
106
107 template<size_t size>
108 static std::string getcodeforcfg(const Settings& settings, ErrorLogger& errorlogger, const char (&code)[size], const std::string &cfg, const std::string &filename, SuppressionList *inlineSuppression = nullptr)

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected