diff options
author | Reinhard Tartler <siretart@tauware.de> | 2019-05-28 07:20:50 -0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2019-05-28 07:20:50 -0400 |
commit | b370dc014446dfe1ea9b8926d13dc8ec643f33b9 (patch) | |
tree | 95f1c8cb423c894e75ce0b27b50f56ffdd2fc7e4 /lib/common/Configuration.cpp | |
parent | e9db5f7277a85068ef9e5515adf8577f74814d5e (diff) | |
parent | 6017757bc079f4446aa77bc5c0855c52741280f4 (diff) |
Update upstream source from tag 'upstream/0.13__git20190527.g039c4a1'
Update to upstream version '0.13~~git20190527.g039c4a1'
with Debian dir 2f67398c74e85067e31e6bf62658e5870a79e436
Diffstat (limited to 'lib/common/Configuration.cpp')
-rw-r--r-- | lib/common/Configuration.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/common/Configuration.cpp b/lib/common/Configuration.cpp index 8ce8d389..9860864a 100644 --- a/lib/common/Configuration.cpp +++ b/lib/common/Configuration.cpp @@ -470,6 +470,16 @@ int Configuration::GetKeyValueInt(const std::string& rKeyName) const } +int Configuration::GetKeyValueInt(const std::string& rKeyName, int default_value) const +{ + if(!KeyExists(rKeyName)) + { + return default_value; + } + return GetKeyValueInt(rKeyName); +} + + // -------------------------------------------------------------------------- // // Function @@ -778,8 +788,7 @@ bool Configuration::Verify(const ConfigurationVerify &rVerify, } else if(pvkey->HasDefaultValue()) { - mKeys[pvkey->Name()] = - pvkey->DefaultValue(); + mKeys[pvkey->Name()] = pvkey->DefaultValue(); } } @@ -922,5 +931,3 @@ bool Configuration::Verify(const ConfigurationVerify &rVerify, return ok; } - - |