diff options
Diffstat (limited to 'src/configparser.cpp')
| -rw-r--r-- | src/configparser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp index 9de4e50e9..093d4fa7d 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -713,6 +713,15 @@ bool ConfigTag::getBool(const std::string& key, bool def) const return def; } +unsigned char ConfigTag::getCharacter(const std::string &key, unsigned char def) const +{ + std::string result; + if (!readString(key, result) || result.size() != 1) + return def; + + return result[0]; +} + ConfigTag::ConfigTag(const std::string& Name, const FilePosition& Source) : name(Name) , source(Source) |
