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

Method GetIntValue

common/MemorySettingsInterface.cpp:28–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28bool MemorySettingsInterface::GetIntValue(const char* section, const char* key, s32* value) const
29{
30 const auto sit = m_sections.find(section);
31 if (sit == m_sections.end())
32 return false;
33
34 const auto iter = sit->second.find(key);
35 if (iter == sit->second.end())
36 return false;
37
38 std::optional<s32> parsed = StringUtil::FromChars<s32>(iter->second, 10);
39 if (!parsed.has_value())
40 return false;
41
42 *value = parsed.value();
43 return true;
44}
45
46bool MemorySettingsInterface::GetUIntValue(const char* section, const char* key, u32* value) const
47{

Callers 2

EntryMethod · 0.45
EntryBitfieldMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected