diff options
| author | 2022-04-16 16:16:29 +0100 | |
|---|---|---|
| committer | 2022-04-16 16:16:29 +0100 | |
| commit | 30edd1070df3ddb2ae64b61b65c25f88a0b61e49 (patch) | |
| tree | 85b33545d32405f7d531bfac2d0b991a6eba3e70 /src/configparser.cpp | |
| parent | Fix the command used to retrieve the number of cores on Alpine. (diff) | |
| parent | Bump peter-evans/create-pull-request from 3 to 4 (diff) | |
Merge branch 'insp3' into master.
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) |
