changeset 616:d79ba6cbf0ee

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Dec 2024 10:08:26 +0100 (4 months ago)
parents 0aaeae85be08
children 5a325e5aee51
files Framework/Common/DatabaseManager.h Framework/Plugins/IndexBackend.cpp Framework/Plugins/IndexConnectionsPool.cpp MySQL/Plugins/MySQLIndex.h Odbc/Plugins/OdbcIndex.h PostgreSQL/Plugins/PostgreSQLIndex.cpp
diffstat 6 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Common/DatabaseManager.h	Tue Dec 17 20:33:12 2024 +0100
+++ b/Framework/Common/DatabaseManager.h	Wed Dec 18 10:08:26 2024 +0100
@@ -223,7 +223,7 @@
         Execute(parameters);
       }
 
-      virtual void Execute(const Dictionary& parameters);
+      virtual void Execute(const Dictionary& parameters) ORTHANC_OVERRIDE;
 
       void ExecuteWithoutResult()
       {
@@ -255,7 +255,7 @@
         Execute(parameters);
       }
 
-      virtual void Execute(const Dictionary& parameters);
+      virtual void Execute(const Dictionary& parameters) ORTHANC_OVERRIDE;
 
       void ExecuteWithoutResult()
       {
--- a/Framework/Plugins/IndexBackend.cpp	Tue Dec 17 20:33:12 2024 +0100
+++ b/Framework/Plugins/IndexBackend.cpp	Wed Dec 18 10:08:26 2024 +0100
@@ -2164,7 +2164,7 @@
     }
     
   public:
-    LookupFormatter(Dialect dialect) :
+    explicit LookupFormatter(Dialect dialect) :
       dialect_(dialect),
       count_(0)
     {
--- a/Framework/Plugins/IndexConnectionsPool.cpp	Tue Dec 17 20:33:12 2024 +0100
+++ b/Framework/Plugins/IndexConnectionsPool.cpp	Wed Dec 18 10:08:26 2024 +0100
@@ -55,10 +55,9 @@
     {
       if (boost::posix_time::second_clock::local_time() - lastInvocation >= that->housekeepingDelay_)
       {
-        Accessor accessor(*that);
-
         try
         {
+          Accessor accessor(*that);
           accessor.GetBackend().PerformDbHousekeeping(accessor.GetManager());
         }
         catch (Orthanc::OrthancException& e)
--- a/MySQL/Plugins/MySQLIndex.h	Tue Dec 17 20:33:12 2024 +0100
+++ b/MySQL/Plugins/MySQLIndex.h	Wed Dec 18 10:08:26 2024 +0100
@@ -35,7 +35,7 @@
     bool                   clearAll_;
 
   protected:
-    virtual bool HasChildCountTable() const
+    virtual bool HasChildCountTable() const ORTHANC_OVERRIDE
     {
       return false;
     }
--- a/Odbc/Plugins/OdbcIndex.h	Tue Dec 17 20:33:12 2024 +0100
+++ b/Odbc/Plugins/OdbcIndex.h	Wed Dec 18 10:08:26 2024 +0100
@@ -35,7 +35,7 @@
     std::string  connectionString_;
     
   protected:
-    virtual bool HasChildCountTable() const
+    virtual bool HasChildCountTable() const ORTHANC_OVERRIDE
     {
       return false;
     }
--- a/PostgreSQL/Plugins/PostgreSQLIndex.cpp	Tue Dec 17 20:33:12 2024 +0100
+++ b/PostgreSQL/Plugins/PostgreSQLIndex.cpp	Wed Dec 18 10:08:26 2024 +0100
@@ -549,11 +549,6 @@
   {
     std::string sql;
 
-    std::vector<std::string> resourceIds;
-    std::vector<std::string> groups;
-    std::vector<std::string> elements;
-    std::vector<std::string> values;
-
     Dictionary args;
     
     for (uint32_t i = 0; i < count; i++)