Skip to content

Commit

Permalink
Add sConfig.IsSet
Browse files Browse the repository at this point in the history
  • Loading branch information
0blu committed Aug 27, 2024
1 parent b2d7378 commit eb9630d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/shared/Config/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ bool Config::GetValueHelper(char const* name, std::string &result) const
return true;
}

bool Config::IsSet(char const* name) const
{
std::string val; // we are not interested in the value
return GetValueHelper(name, val);
}

std::string Config::GetStringDefault(char const* name, char const* def) const
{
std::string val;
Expand Down
2 changes: 2 additions & 0 deletions src/shared/Config/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Config
bool LoadFromFile(std::string const& filename);
bool Reload();

bool IsSet(char const* name) const;

std::string GetStringDefault(char const* name, char const* def) const;
bool GetBoolDefault(char const* name, bool def) const;
int32 GetIntDefault(char const* name, int32 def) const;
Expand Down

0 comments on commit eb9630d

Please sign in to comment.