| 802 | } |
| 803 | |
| 804 | static void splitcfg(const std::string &cfgStr, std::list<std::string> &defines, const std::string &defaultValue) |
| 805 | { |
| 806 | for (std::string::size_type defineStartPos = 0U; defineStartPos < cfgStr.size();) { |
| 807 | const std::string::size_type defineEndPos = cfgStr.find(';', defineStartPos); |
| 808 | std::string def = (defineEndPos == std::string::npos) ? cfgStr.substr(defineStartPos) : cfgStr.substr(defineStartPos, defineEndPos - defineStartPos); |
| 809 | if (!defaultValue.empty() && def.find('=') == std::string::npos) |
| 810 | def += '=' + defaultValue; |
| 811 | defines.push_back(std::move(def)); |
| 812 | if (defineEndPos == std::string::npos) |
| 813 | break; |
| 814 | defineStartPos = defineEndPos + 1U; |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | static simplecpp::DUI createDUI(const Settings &mSettings, const std::string &cfgStr, Standards::Language lang) |
| 819 | { |