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

Method selectVsConfigurations

lib/importproject.cpp:1666–1688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1664}
1665
1666void ImportProject::selectVsConfigurations(Platform::Type platform, const std::vector<std::string> &configurations)
1667{
1668 for (auto it = fileSettings.cbegin(); it != fileSettings.cend();) {
1669 if (it->cfg.empty()) {
1670 ++it;
1671 continue;
1672 }
1673 const FileSettings &fs = *it;
1674 const auto config = fs.cfg.substr(0, fs.cfg.find('|'));
1675 bool remove = false;
1676 if (std::find(configurations.begin(), configurations.end(), config) == configurations.end())
1677 remove = true;
1678 if (platform == Platform::Type::Win64 && fs.platformType != platform)
1679 remove = true;
1680 else if ((platform == Platform::Type::Win32A || platform == Platform::Type::Win32W) && fs.platformType == Platform::Type::Win64)
1681 remove = true;
1682 if (remove) {
1683 it = fileSettings.erase(it);
1684 } else {
1685 ++it;
1686 }
1687 }
1688}
1689
1690std::list<std::string> ImportProject::getVSConfigs()
1691{

Callers 1

doAnalyzeProjectMethod · 0.80

Calls 5

emptyMethod · 0.45
findMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected