MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / RemoveFromStringList

Method RemoveFromStringList

common/MemorySettingsInterface.cpp:251–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251bool 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
275bool MemorySettingsInterface::AddToStringList(const char* section, const char* key, const char* item)
276{

Callers

nothing calls this directly

Calls 4

stringClass · 0.50
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected