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

Method GetFloatValue

common/MemorySettingsInterface.cpp:64–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool MemorySettingsInterface::GetFloatValue(const char* section, const char* key, float* value) const
65{
66 const auto sit = m_sections.find(section);
67 if (sit == m_sections.end())
68 return false;
69
70 const auto iter = sit->second.find(key);
71 if (iter == sit->second.end())
72 return false;
73
74 std::optional<float> parsed = StringUtil::FromChars<float>(iter->second);
75 if (!parsed.has_value())
76 return false;
77
78 *value = parsed.value();
79 return true;
80}
81
82bool MemorySettingsInterface::GetDoubleValue(const char* section, const char* key, double* value) const
83{

Callers 1

EntryMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected