changeset 3934:0b59e2706366 transcoding

guard on SDK version in OrthancPlugins::MemoryBuffer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 May 2020 15:15:58 +0200
parents f67b48833a4f
children 09262122934c
files Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Plugins/Samples/Common/OrthancPluginCppWrapper.h
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Fri May 15 12:25:36 2020 +0200
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Fri May 15 15:15:58 2020 +0200
@@ -130,6 +130,7 @@
   }
 
 
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0)
   MemoryBuffer::MemoryBuffer(const void* buffer,
                              size_t size)
   {
@@ -148,6 +149,7 @@
       memcpy(buffer_.data, buffer, size);
     }
   }
+#endif
 
 
   void MemoryBuffer::Clear()
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Fri May 15 12:25:36 2020 +0200
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Fri May 15 15:15:58 2020 +0200
@@ -146,8 +146,12 @@
   public:
     MemoryBuffer();
 
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0)
+    // This constructor makes a copy of the given buffer in the memory
+    // handled by the Orthanc core
     MemoryBuffer(const void* buffer,
                  size_t size);
+#endif
 
     ~MemoryBuffer()
     {