changeset 2123:1cf093cbdad8

cleaning up
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Nov 2016 11:51:40 +0100
parents 2ecc95a239f7
children 2b1520efa282
files OrthancServer/ServerToolbox.cpp OrthancServer/ServerToolbox.h
diffstat 2 files changed, 24 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/ServerToolbox.cpp	Mon Nov 07 11:33:18 2016 +0100
+++ b/OrthancServer/ServerToolbox.cpp	Mon Nov 07 11:51:40 2016 +0100
@@ -237,6 +237,30 @@
     }
 
 
+    static void StoreIdentifiers(IDatabaseWrapper& database,
+                                 int64_t resource,
+                                 ResourceType level,
+                                 const DicomMap& map)
+    {
+      const DicomTag* tags;
+      size_t size;
+
+      LoadIdentifiers(tags, size, level);
+
+      for (size_t i = 0; i < size; i++)
+      {
+        const DicomValue* value = map.TestAndGetValue(tags[i]);
+        if (value != NULL &&
+            !value->IsNull() &&
+            !value->IsBinary())
+        {
+          std::string s = NormalizeIdentifier(value->GetContent());
+          database.SetIdentifierTag(resource, tags[i], s);
+        }
+      }
+    }
+
+
     void StoreMainDicomTags(IDatabaseWrapper& database,
                             int64_t resource,
                             ResourceType level,
@@ -466,29 +490,5 @@
 
       return false;
     }
-
-
-    void StoreIdentifiers(IDatabaseWrapper& database,
-                          int64_t resource,
-                          ResourceType level,
-                          const DicomMap& map)
-    {
-      const DicomTag* tags;
-      size_t size;
-
-      LoadIdentifiers(tags, size, level);
-
-      for (size_t i = 0; i < size; i++)
-      {
-        const DicomValue* value = map.TestAndGetValue(tags[i]);
-        if (value != NULL &&
-            !value->IsNull() &&
-            !value->IsBinary())
-        {
-          std::string s = NormalizeIdentifier(value->GetContent());
-          database.SetIdentifierTag(resource, tags[i], s);
-        }
-      }
-    }
   }
 }
--- a/OrthancServer/ServerToolbox.h	Mon Nov 07 11:33:18 2016 +0100
+++ b/OrthancServer/ServerToolbox.h	Mon Nov 07 11:51:40 2016 +0100
@@ -68,11 +68,6 @@
     bool IsIdentifier(const DicomTag& tag,
                       ResourceType level);
 
-    void StoreIdentifiers(IDatabaseWrapper& database,
-                          int64_t resource,
-                          ResourceType level,
-                          const DicomMap& map);
-
     std::string NormalizeIdentifier(const std::string& value);
   }
 }