changeset 5460:1474fd6ea6c6

CppCheck
author Alain Mazy <am@osimis.io>
date Mon, 11 Dec 2023 12:03:48 +0100
parents d7c9c85d78dc
children 67dc2567ea6f
files OrthancFramework/Sources/Cache/MemoryStringCache.h OrthancFramework/Sources/FileStorage/StorageCache.h OrthancServer/Sources/LuaScripting.cpp OrthancServer/Sources/Search/ISqlLookupFormatter.cpp
diffstat 4 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/Cache/MemoryStringCache.h	Fri Dec 08 10:26:53 2023 +0100
+++ b/OrthancFramework/Sources/Cache/MemoryStringCache.h	Mon Dec 11 12:03:48 2023 +0100
@@ -59,7 +59,7 @@
 
 
     public:
-      Accessor(MemoryStringCache& cache);
+      explicit Accessor(MemoryStringCache& cache);
       ~Accessor();
 
       bool Fetch(std::string& value, const std::string& key);
--- a/OrthancFramework/Sources/FileStorage/StorageCache.h	Fri Dec 08 10:26:53 2023 +0100
+++ b/OrthancFramework/Sources/FileStorage/StorageCache.h	Mon Dec 11 12:03:48 2023 +0100
@@ -48,7 +48,7 @@
       {
         StorageCache& storageCache_;
       public:
-        Accessor(StorageCache& cache);
+        explicit Accessor(StorageCache& cache);
 
         void Add(const std::string& uuid, 
                  FileContentType contentType,
--- a/OrthancServer/Sources/LuaScripting.cpp	Fri Dec 08 10:26:53 2023 +0100
+++ b/OrthancServer/Sources/LuaScripting.cpp	Mon Dec 11 12:03:48 2023 +0100
@@ -245,7 +245,7 @@
     JobEvent event_;
 
   public:
-    LuaJobEvent(const JobEvent& event) :
+    explicit LuaJobEvent(const JobEvent& event) :
       event_(event)
     {
     }
--- a/OrthancServer/Sources/Search/ISqlLookupFormatter.cpp	Fri Dec 08 10:26:53 2023 +0100
+++ b/OrthancServer/Sources/Search/ISqlLookupFormatter.cpp	Mon Dec 11 12:03:48 2023 +0100
@@ -664,7 +664,6 @@
 
     if (mainDicomTagsComparisons.size() > 0)
     {
-      std::string comparisons;
       for (std::vector<std::string>::const_iterator it = mainDicomTagsComparisons.begin(); it < mainDicomTagsComparisons.end(); ++it)
       {
         sql += (" AND internalId IN (SELECT id FROM MainDicomTags WHERE " + *it + ") ");