diff OrthancServer/Sources/Search/DatabaseLookup.cpp @ 4932:b7ce2bb6b881 more-tags

refactored the list of MainDicomTags to be able to change it dynamicaly. Unit tests and Integration tests ok
author Alain Mazy <am@osimis.io>
date Wed, 09 Mar 2022 11:17:08 +0100
parents 6eff25f70121
children dad71e6da406
line wrap: on
line diff
--- a/OrthancServer/Sources/Search/DatabaseLookup.cpp	Mon Mar 07 10:55:43 2022 +0100
+++ b/OrthancServer/Sources/Search/DatabaseLookup.cpp	Wed Mar 09 11:17:08 2022 +0100
@@ -281,14 +281,13 @@
 
   bool DatabaseLookup::HasOnlyMainDicomTags() const
   {
-    std::set<DicomTag> mainTags;
-    DicomMap::GetMainDicomTags(mainTags);
+    const std::set<DicomTag>& allMainTags = DicomMap::GetAllMainDicomTags();
 
     for (size_t i = 0; i < constraints_.size(); i++)
     {
       assert(constraints_[i] != NULL);
       
-      if (mainTags.find(constraints_[i]->GetTag()) == mainTags.end())
+      if (allMainTags.find(constraints_[i]->GetTag()) == allMainTags.end())
       {
         // This is not a main DICOM tag
         return false;