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

Method GetBoolValue

common/MemorySettingsInterface.cpp:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100bool MemorySettingsInterface::GetBoolValue(const char* section, const char* key, bool* value) const
101{
102 const auto sit = m_sections.find(section);
103 if (sit == m_sections.end())
104 return false;
105
106 const auto iter = sit->second.find(key);
107 if (iter == sit->second.end())
108 return false;
109
110 std::optional<bool> parsed = StringUtil::FromChars<bool>(iter->second);
111 if (!parsed.has_value())
112 return false;
113
114 *value = parsed.value();
115 return true;
116}
117
118bool MemorySettingsInterface::GetStringValue(const char* section, const char* key, std::string* value) const
119{

Callers 2

EntryMethod · 0.45
EntryBitBoolMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected