changeset 1314:01be1432bda9

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Feb 2015 12:33:07 +0100
parents 28582ec2a68c
children 0c735fed8953
files Plugins/Engine/OrthancPluginDatabase.cpp Plugins/Engine/OrthancPluginDatabase.h
diffstat 2 files changed, 20 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPluginDatabase.cpp	Wed Feb 11 12:09:33 2015 +0100
+++ b/Plugins/Engine/OrthancPluginDatabase.cpp	Wed Feb 11 12:33:07 2015 +0100
@@ -119,7 +119,7 @@
     if (type_ == _OrthancPluginDatabaseAnswerType_Int64)
     {
       for (std::list<int64_t>::const_iterator 
-             it = answerInt64_.begin(); it != answerInt64_.end(); it++)
+             it = answerInt64_.begin(); it != answerInt64_.end(); ++it)
       {
         target.push_back(*it);
       }
@@ -140,7 +140,7 @@
     if (type_ == _OrthancPluginDatabaseAnswerType_String)
     {
       for (std::list<std::string>::const_iterator 
-             it = answerStrings_.begin(); it != answerStrings_.end(); it++)
+             it = answerStrings_.begin(); it != answerStrings_.end(); ++it)
       {
         target.push_back(*it);
       }
@@ -186,6 +186,20 @@
   }
 
 
+  OrthancPluginDatabase::OrthancPluginDatabase(const OrthancPluginDatabaseBackend& backend,
+                                               void *payload) : 
+    type_(_OrthancPluginDatabaseAnswerType_None),
+    backend_(backend),
+    payload_(payload),
+    listener_(NULL),
+    answerDicomMap_(NULL),
+    answerChanges_(NULL),
+    answerExportedResources_(NULL),
+    answerDone_(NULL)
+  {
+  }
+
+
   void OrthancPluginDatabase::AddAttachment(int64_t id,
                                             const FileInfo& attachment)
   {
@@ -285,7 +299,7 @@
     target.clear();
 
     for (std::list<MetadataType>::const_iterator
-           it = metadata.begin(); it != metadata.end(); it++)
+           it = metadata.begin(); it != metadata.end(); ++it)
     {
       std::string value;
       if (!LookupMetadata(value, id, *it))
@@ -532,7 +546,7 @@
     if (type_ == _OrthancPluginDatabaseAnswerType_Int32)
     {
       for (std::list<int32_t>::const_iterator 
-             it = answerInt32_.begin(); it != answerInt32_.end(); it++)
+             it = answerInt32_.begin(); it != answerInt32_.end(); ++it)
       {
         target.push_back(static_cast<MetadataType>(*it));
       }
@@ -561,7 +575,7 @@
     if (type_ == _OrthancPluginDatabaseAnswerType_Int32)
     {
       for (std::list<int32_t>::const_iterator 
-             it = answerInt32_.begin(); it != answerInt32_.end(); it++)
+             it = answerInt32_.begin(); it != answerInt32_.end(); ++it)
       {
         target.push_back(static_cast<FileContentType>(*it));
       }
--- a/Plugins/Engine/OrthancPluginDatabase.h	Wed Feb 11 12:09:33 2015 +0100
+++ b/Plugins/Engine/OrthancPluginDatabase.h	Wed Feb 11 12:33:07 2015 +0100
@@ -77,13 +77,7 @@
 
   public:
     OrthancPluginDatabase(const OrthancPluginDatabaseBackend& backend,
-                          void *payload) : 
-    type_(_OrthancPluginDatabaseAnswerType_None),
-    backend_(backend),
-    payload_(payload),
-    listener_(NULL)
-    {
-    }
+                          void *payload);
 
     virtual void AddAttachment(int64_t id,
                                const FileInfo& attachment);