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

Method GetUIntValue

common/MemorySettingsInterface.cpp:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46bool MemorySettingsInterface::GetUIntValue(const char* section, const char* key, u32* value) const
47{
48 const auto sit = m_sections.find(section);
49 if (sit == m_sections.end())
50 return false;
51
52 const auto iter = sit->second.find(key);
53 if (iter == sit->second.end())
54 return false;
55
56 std::optional<u32> parsed = StringUtil::FromChars<u32>(iter->second, 10);
57 if (!parsed.has_value())
58 return false;
59
60 *value = parsed.value();
61 return true;
62}
63
64bool MemorySettingsInterface::GetFloatValue(const char* section, const char* key, float* value) const
65{

Callers 1

EntryMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected