Mercurial > hg > orthanc-webviewer
diff Plugin/Plugin.cpp @ 197:0ef2d8b970ab
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 23 Apr 2018 11:42:31 +0200 |
parents | 993dd140bd30 |
children | 7edc2c82996c |
line wrap: on
line diff
--- a/Plugin/Plugin.cpp Fri Apr 20 14:23:34 2018 +0200 +++ b/Plugin/Plugin.cpp Mon Apr 23 11:42:31 2018 +0200 @@ -50,7 +50,7 @@ std::string value_; public: - DynamicString(const char* value) : value_(value) + explicit DynamicString(const char* value) : value_(value) { } @@ -94,7 +94,7 @@ public: - CacheContext(const std::string& path) : storage_(path), stop_(false) + explicit CacheContext(const std::string& path) : storage_(path), stop_(false) { boost::filesystem::path p(path); db_.Open((p / "cache.db").string()); @@ -494,9 +494,10 @@ } } - static const char* CONFIG_RESTRICT_TRANSFER_SYNTAXES = "RestrictTransferSyntaxes"; if (enableGdcm) { + static const char* CONFIG_RESTRICT_TRANSFER_SYNTAXES = "RestrictTransferSyntaxes"; + if (configuration[CONFIG_WEB_VIEWER].isMember(CONFIG_RESTRICT_TRANSFER_SYNTAXES)) { const Json::Value& config = configuration[CONFIG_WEB_VIEWER][CONFIG_RESTRICT_TRANSFER_SYNTAXES]; @@ -579,11 +580,11 @@ /* By default, use GDCM */ bool enableGdcm = true; - /* By default, a cache of 100 MB is used */ - int cacheSize = 100; - try { + /* By default, a cache of 100 MB is used */ + int cacheSize = 100; + boost::filesystem::path cachePath; ParseConfiguration(enableGdcm, decodingThreads, cachePath, cacheSize);