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

Method SetValue

common/MemorySettingsInterface.cpp:196–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196void MemorySettingsInterface::SetValue(const char* section, const char* key, std::string value)
197{
198 auto sit = m_sections.find(section);
199 if (sit == m_sections.end())
200 sit = m_sections.emplace(std::make_pair(std::string(section), KeyMap())).first;
201
202 const auto range = sit->second.equal_range(key);
203 if (range.first == sit->second.end())
204 {
205 sit->second.emplace(std::string(key), std::move(value));
206 return;
207 }
208
209 auto iter = range.first;
210 iter->second = std::move(value);
211 ++iter;
212
213 // remove other values
214 while (iter != range.second)
215 {
216 auto remove = iter++;
217 sit->second.erase(remove);
218 }
219}
220
221std::vector<std::string> MemorySettingsInterface::GetStringList(const char* section, const char* key) const
222{

Callers 9

SetIntValueMethod · 0.45
SetUIntValueMethod · 0.45
SetFloatValueMethod · 0.45
SetDoubleValueMethod · 0.45
SetStringValueMethod · 0.45
ClearSectionMethod · 0.45
SetStringListMethod · 0.45
AddToStringListMethod · 0.45
SetKeyValueListMethod · 0.45

Calls 4

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

Tested by

no test coverage detected