diff Plugin/ResourceHierarchyCache.cpp @ 29:bc0431cb6b8f

fix for compatibility with simplified OrthancPluginCppWrapper
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Dec 2018 21:16:54 +0100
parents c44013681a51
children c304ffca5d80
line wrap: on
line diff
--- a/Plugin/ResourceHierarchyCache.cpp	Fri Nov 09 10:55:42 2018 +0100
+++ b/Plugin/ResourceHierarchyCache.cpp	Tue Dec 04 21:16:54 2018 +0100
@@ -60,7 +60,7 @@
     OrthancResource parent;
     std::list<OrthancResource> children;
 
-    if (!resource.GetHierarchy(dicomUid, parent, children, context_))
+    if (!resource.GetHierarchy(dicomUid, parent, children))
     {
       // The resource is non-existing (*)
       return false;
@@ -92,9 +92,7 @@
   }
 
 
-  ResourceHierarchyCache::ResourceHierarchyCache(OrthancPluginContext* context,
-                                                 ICacheFactory& factory) :
-    context_(context),
+  ResourceHierarchyCache::ResourceHierarchyCache(ICacheFactory& factory) :
     cache_(factory.Create()),
     orthancToDicom_(factory.Create()),
     dicomToOrthanc_(factory.Create())
@@ -162,7 +160,7 @@
 
     OrthancResource resource(level, orthancId);
 
-    if (resource.GetDicomUid(target, context_))
+    if (resource.GetDicomUid(target))
     {
       orthancToDicom_->Store(key, target, 0 /* no expiration */);
       return true;
@@ -187,7 +185,7 @@
 
     OrthancResource resource(level, dicomUid);
 
-    if (OrthancResource::LookupOrthancId(target, context_, level, dicomUid))
+    if (OrthancResource::LookupOrthancId(target, level, dicomUid))
     {
       dicomToOrthanc_->Store(key, target, 0 /* no expiration */);
       return true;