| 234 | } |
| 235 | |
| 236 | void MemorySettingsInterface::SetStringList(const char* section, const char* key, const std::vector<std::string>& items) |
| 237 | { |
| 238 | auto sit = m_sections.find(section); |
| 239 | if (sit == m_sections.end()) |
| 240 | sit = m_sections.emplace(std::make_pair(std::string(section), KeyMap())).first; |
| 241 | |
| 242 | const auto range = sit->second.equal_range(key); |
| 243 | for (auto iter = range.first; iter != range.second;) |
| 244 | sit->second.erase(iter++); |
| 245 | |
| 246 | std::string_view keysv(key); |
| 247 | for (const std::string& value : items) |
| 248 | sit->second.emplace(keysv, value); |
| 249 | } |
| 250 | |
| 251 | bool MemorySettingsInterface::RemoveFromStringList(const char* section, const char* key, const char* item) |
| 252 | { |