Mercurial > hg > orthanc
diff OrthancServer/OrthancConfiguration.cpp @ 3939:c205f670098e transcoding
new configuration options: BuiltinDecoderTranscoderOrder and IngestTranscoding
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 18 May 2020 17:15:16 +0200 |
parents | 1f4910999fe7 |
children | e3b3af80732d |
line wrap: on
line diff
--- a/OrthancServer/OrthancConfiguration.cpp Mon May 18 15:59:50 2020 +0200 +++ b/OrthancServer/OrthancConfiguration.cpp Mon May 18 17:15:16 2020 +0200 @@ -422,8 +422,8 @@ } - std::string OrthancConfiguration::GetStringParameter(const std::string& parameter, - const std::string& defaultValue) const + bool OrthancConfiguration::LookupStringParameter(std::string& target, + const std::string& parameter) const { if (json_.isMember(parameter)) { @@ -434,11 +434,27 @@ } else { - return json_[parameter].asString(); + target = json_[parameter].asString(); + return true; } } else { + return false; + } + } + + + std::string OrthancConfiguration::GetStringParameter(const std::string& parameter, + const std::string& defaultValue) const + { + std::string value; + if (LookupStringParameter(value, parameter)) + { + return value; + } + else + { return defaultValue; } }