changeset 295:fc57bf7c0c83

backward compatibility with Orthanc framework 1.8.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 Jan 2021 07:29:14 +0100
parents dca8013585d1
children d179f3928342
files Plugin/Cache/CacheManager.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/Cache/CacheManager.cpp	Fri Jan 29 07:08:22 2021 +0100
+++ b/Plugin/Cache/CacheManager.cpp	Fri Jan 29 07:29:14 2021 +0100
@@ -475,9 +475,14 @@
     bool ok;
     try
     {
+#if defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) && ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 9, 0) 
       std::unique_ptr<Orthanc::IMemoryBuffer> buffer(
         pimpl_->storage_.Read(uuid, Orthanc::FileContentType_Unknown));
       buffer->MoveToString(content);
+#else
+      pimpl_->storage_.Read(content, uuid, Orthanc::FileContentType_Unknown);
+#endif
+      
       ok = (content.size() == size);
     }
     catch (std::runtime_error&)