| 517 | } |
| 518 | |
| 519 | static bool hasDefine(const std::string &userDefines, const std::string &cfgStr) |
| 520 | { |
| 521 | if (cfgStr.empty()) { |
| 522 | return false; |
| 523 | } |
| 524 | |
| 525 | std::string::size_type pos = 0; |
| 526 | const std::string cfgname = cfgStr.substr(0, cfgStr.find('=')); |
| 527 | while (pos < userDefines.size()) { |
| 528 | pos = userDefines.find(cfgname, pos); |
| 529 | if (pos == std::string::npos) |
| 530 | break; |
| 531 | const std::string::size_type pos2 = pos + cfgname.size(); |
| 532 | if ((pos == 0 || userDefines[pos-1U] == ';') && (pos2 == userDefines.size() || userDefines[pos2] == '=')) |
| 533 | return true; |
| 534 | pos = pos2; |
| 535 | } |
| 536 | return false; |
| 537 | } |
| 538 | |
| 539 | static std::string cfg(const std::vector<std::string> &configs, const std::string &userDefines) |
| 540 | { |
no test coverage detected