# HG changeset patch # User Sebastien Jodogne # Date 1589548558 -7200 # Node ID 0b59e2706366a94f95c1564b3e7973114aa72317 # Parent f67b48833a4f268617ea3994ce3a4c84ab1da0cd guard on SDK version in OrthancPlugins::MemoryBuffer diff -r f67b48833a4f -r 0b59e2706366 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp --- 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() diff -r f67b48833a4f -r 0b59e2706366 Plugins/Samples/Common/OrthancPluginCppWrapper.h --- 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() {