mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-10-14 15:00:53 +02:00
Qt: Clean and remove empty game settings
This commit is contained in:
1 parent
12af031193
commit
2ab6a3b873
21 files changed
+267
-81
No files matched your search
@@ -20,6 +20,11 @@ void MemorySettingsInterface::Clear()
|
||||
m_sections.clear();
|
||||
}
|
||||
|
||||
bool MemorySettingsInterface::IsEmpty()
|
||||
{
|
||||
return m_sections.empty();
|
||||
}
|
||||
|
||||
bool MemorySettingsInterface::GetIntValue(const char* section, const char* key, s32* value) const
|
||||
{
|
||||
const auto sit = m_sections.find(section);
|
||||
@@ -312,3 +317,26 @@ void MemorySettingsInterface::ClearSection(const char* section)
|
||||
|
||||
m_sections.erase(sit);
|
||||
}
|
||||
|
||||
void MemorySettingsInterface::RemoveSection(const char* section)
|
||||
{
|
||||
auto sit = m_sections.find(section);
|
||||
if (sit == m_sections.end())
|
||||
return;
|
||||
|
||||
m_sections.erase(sit);
|
||||
}
|
||||
|
||||
void MemorySettingsInterface::RemoveEmptySections()
|
||||
{
|
||||
for (auto sit = m_sections.begin(); sit != m_sections.end();)
|
||||
{
|
||||
if (sit->second.size() > 0)
|
||||
{
|
||||
++sit;
|
||||
continue;
|
||||
}
|
||||
|
||||
sit = m_sections.erase(sit);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user