Renamed method

This commit is contained in:
Daniel Marjamäki 2018-03-11 15:06:08 +01:00
parent 380ecc408f
commit 46307df9b6
3 changed files with 9 additions and 4 deletions

View File

@ -714,7 +714,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
_settings->platform(Settings::Native);
else if (platform == "unspecified")
_settings->platform(Settings::Unspecified);
else if (!_settings->platformFile(argv[0], platform)) {
else if (!_settings->loadPlatformFile(argv[0], platform)) {
std::string message("cppcheck: error: unrecognized platform: \"");
message += platform;
message += "\".";

View File

@ -154,7 +154,7 @@ bool cppcheck::Platform::platform(cppcheck::Platform::PlatformType type)
return false;
}
bool cppcheck::Platform::platformFile(const char exename[], const std::string &filename)
bool cppcheck::Platform::loadPlatformFile(const char exename[], const std::string &filename)
{
// open file..
tinyxml2::XMLDocument doc;

View File

@ -100,8 +100,13 @@ namespace cppcheck {
/** set the platform type for predefined platforms */
bool platform(PlatformType type);
/** set the platform type for user specified platforms */
bool platformFile(const char exename[], const std::string &filename);
/**
* load platform file
* @param exename application path
* @param filename platform filename
* @return returns true if file was loaded successfully
*/
bool loadPlatformFile(const char exename[], const std::string &filename);
/** load platform from xml document, primarily for testing */
bool loadFromXmlDocument(const tinyxml2::XMLDocument *doc);