SettingsInterface: Add SmallString overloads

This commit is contained in:
Stenzek
2024-04-07 20:41:24 +10:00
parent 6b7cf6a432
commit 631fca3042
9 changed files with 124 additions and 4 deletions

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));