| 249 | } |
| 250 | |
| 251 | bool MemorySettingsInterface::RemoveFromStringList(const char* section, const char* key, const char* item) |
| 252 | { |
| 253 | auto sit = m_sections.find(section); |
| 254 | if (sit == m_sections.end()) |
| 255 | sit = m_sections.emplace(std::make_pair(std::string(section), KeyMap())).first; |
| 256 | |
| 257 | const auto range = sit->second.equal_range(key); |
| 258 | bool result = false; |
| 259 | for (auto iter = range.first; iter != range.second;) |
| 260 | { |
| 261 | if (iter->second == item) |
| 262 | { |
| 263 | sit->second.erase(iter++); |
| 264 | result = true; |
| 265 | } |
| 266 | else |
| 267 | { |
| 268 | ++iter; |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | return result; |
| 273 | } |
| 274 | |
| 275 | bool MemorySettingsInterface::AddToStringList(const char* section, const char* key, const char* item) |
| 276 | { |