changeset 5344:f41e1f635c4d

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Jun 2023 12:24:52 +0200
parents cba09fd1e234
children 34781fb0172a
files OrthancFramework/Sources/HttpServer/HttpContentNegociation.cpp OrthancFramework/Sources/MetricsRegistry.cpp OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp
diffstat 3 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpContentNegociation.cpp	Wed Jun 28 12:16:54 2023 +0200
+++ b/OrthancFramework/Sources/HttpServer/HttpContentNegociation.cpp	Wed Jun 28 12:24:52 2023 +0200
@@ -231,7 +231,6 @@
     Toolbox::TokenizeString(mediaRanges, accept, ',');
 
     std::unique_ptr<Reference> bestMatch;
-    Dictionary bestParameters;
 
     for (Tokens::const_iterator it = mediaRanges.begin();
          it != mediaRanges.end(); ++it)
--- a/OrthancFramework/Sources/MetricsRegistry.cpp	Wed Jun 28 12:16:54 2023 +0200
+++ b/OrthancFramework/Sources/MetricsRegistry.cpp	Wed Jun 28 12:24:52 2023 +0200
@@ -186,7 +186,7 @@
     MetricsUpdatePolicy   policy_;
     
   public:
-    Item(MetricsUpdatePolicy policy) :
+    explicit Item(MetricsUpdatePolicy policy) :
       policy_(policy)
     {
     }
@@ -222,7 +222,7 @@
     TimestampedValue<float>  value_;
 
   public:
-    FloatItem(MetricsUpdatePolicy policy) :
+    explicit FloatItem(MetricsUpdatePolicy policy) :
       Item(policy)
     {
     }
@@ -270,7 +270,7 @@
     TimestampedValue<int64_t>  value_;
 
   public:
-    IntegerItem(MetricsUpdatePolicy policy) :
+    explicit IntegerItem(MetricsUpdatePolicy policy) :
       Item(policy)
     {
     }
--- a/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp	Wed Jun 28 12:16:54 2023 +0200
+++ b/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp	Wed Jun 28 12:24:52 2023 +0200
@@ -222,7 +222,7 @@
     catch (OrthancException& e)
     {
       LOG(WARNING) << "An error occurred while executing a Modification job on instance " << instance << ": " << e.GetDetails();
-      throw e;
+      throw;
     }