mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Common/IniFile: Add Exists function for section name only
This commit is contained in:
parent
4d9f556456
commit
08c95883e9
@ -176,6 +176,11 @@ bool IniFile::DeleteSection(std::string_view section_name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IniFile::Exists(std::string_view section_name) const
|
||||||
|
{
|
||||||
|
return GetSection(section_name) != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool IniFile::Exists(std::string_view section_name, std::string_view key) const
|
bool IniFile::Exists(std::string_view section_name, std::string_view key) const
|
||||||
{
|
{
|
||||||
const Section* section = GetSection(section_name);
|
const Section* section = GetSection(section_name);
|
||||||
|
@ -119,6 +119,7 @@ public:
|
|||||||
|
|
||||||
bool Save(const std::string& filename);
|
bool Save(const std::string& filename);
|
||||||
|
|
||||||
|
bool Exists(std::string_view section_name) const;
|
||||||
// Returns true if key exists in section
|
// Returns true if key exists in section
|
||||||
bool Exists(std::string_view section_name, std::string_view key) const;
|
bool Exists(std::string_view section_name, std::string_view key) const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user