diff OrthancFramework/Sources/Toolbox.h @ 4941:96a3e81eba90 more-tags

performance warning
author Alain Mazy <am@osimis.io>
date Wed, 16 Mar 2022 09:50:33 +0100
parents f630796a59b1
children d0c34145320c
line wrap: on
line diff
--- a/OrthancFramework/Sources/Toolbox.h	Tue Mar 15 15:57:21 2022 +0100
+++ b/OrthancFramework/Sources/Toolbox.h	Wed Mar 16 09:50:33 2022 +0100
@@ -234,6 +234,14 @@
       }
     }
 
+    template <typename T> static void RemoveSets(std::set<T>& target, const std::set<T>& toRemove)
+    {
+      for (typename std::set<T>::const_iterator it = toRemove.begin();
+            it != toRemove.end(); it++)
+      {
+        target.erase(*it);
+      }
+    }
 
 #if ORTHANC_ENABLE_PUGIXML == 1
     static void JsonToXml(std::string& target,