| 555 | } |
| 556 | |
| 557 | static bool isUndefined(const std::string &cfgStr, const std::set<std::string> &undefined) |
| 558 | { |
| 559 | for (std::string::size_type pos1 = 0U; pos1 < cfgStr.size();) { |
| 560 | const std::string::size_type pos2 = cfgStr.find(';',pos1); |
| 561 | const std::string def = (pos2 == std::string::npos) ? cfgStr.substr(pos1) : cfgStr.substr(pos1, pos2 - pos1); |
| 562 | |
| 563 | const std::string::size_type eq = def.find('='); |
| 564 | if (eq == std::string::npos && undefined.find(def) != undefined.end()) |
| 565 | return true; |
| 566 | if (eq != std::string::npos && undefined.find(def.substr(0,eq)) != undefined.end() && def.substr(eq) != "=0") |
| 567 | return true; |
| 568 | |
| 569 | pos1 = (pos2 == std::string::npos) ? pos2 : pos2 + 1U; |
| 570 | } |
| 571 | return false; |
| 572 | } |
| 573 | |
| 574 | static bool getConfigsElseIsFalse(const std::vector<std::string> &configs_if, const std::string &userDefines) |
| 575 | { |
no test coverage detected