SettingsInterface: Add SmallString overloads

This commit is contained in:
Stenzek committed 2024-04-09 19:54:25 +10:00
1 parent 6b7cf6a432
commit 631fca3042
9 files changed
+124 -4

No files matched your search

+14
View File
@@ -126,6 +126,20 @@ bool MemorySettingsInterface::GetStringValue(const char* section, const char* ke
return true;
}
bool MemorySettingsInterface::GetStringValue(const char* section, const char* key, SmallStringBase* value) const
{
const auto sit = m_sections.find(section);
if (sit == m_sections.end())
return false;
const auto iter = sit->second.find(key);
if (iter == sit->second.end())
return false;
value->assign(iter->second);
return true;
}
void MemorySettingsInterface::SetIntValue(const char* section, const char* key, s32 value)
{
SetValue(section, key, std::to_string(value));