| 197 | } |
| 198 | |
| 199 | const char* get_value_multi(const CSimpleIni& ini, const char* key, ...) { |
| 200 | const char* ret = nullptr; |
| 201 | const char* section = nullptr; |
| 202 | |
| 203 | std::string keyWithUnderscores(key); |
| 204 | for (int i = keyWithUnderscores.size() - 1; i >= 0; --i) { |
| 205 | if (keyWithUnderscores[i] == '-') { |
| 206 | keyWithUnderscores.at(i) = '_'; |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | va_list ap; |
| 211 | va_start(ap, key); |
| 212 | while (!ret && (section = va_arg(ap, const char*))) { |
| 213 | ret = ini.GetValue(section, key, nullptr); |
| 214 | if (!ret) { |
| 215 | ret = ini.GetValue(section, keyWithUnderscores.c_str(), nullptr); |
| 216 | } |
| 217 | } |
| 218 | va_end(ap); |
| 219 | return ret; |
| 220 | } |
| 221 | |
| 222 | bool isParameterNameEqual(const char* str, const char* target) { |
| 223 | if (!str || !target) { |