changeset 4915:189ae9a37e01

reorder arguments to put the target as first argument (convention)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Feb 2022 22:18:54 +0100
parents 4b10cbf3ccc8
children 95378de340d4
files OrthancServer/Plugins/Engine/OrthancPlugins.cpp OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp
diffstat 3 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Tue Feb 22 22:14:31 2022 +0100
+++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Tue Feb 22 22:18:54 2022 +0100
@@ -2302,7 +2302,7 @@
       
       {
         OrthancPluginMemoryBuffer64 buffer;
-        callbackResult = (*pimpl_->receivedInstanceCallback_) (receivedDicom, receivedDicomSize, &buffer);
+        callbackResult = (*pimpl_->receivedInstanceCallback_) (&buffer, receivedDicom, receivedDicomSize);
         modified.Assign(buffer.data, buffer.size, ::free);
       }
 
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h	Tue Feb 22 22:14:31 2022 +0100
+++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h	Tue Feb 22 22:18:54 2022 +0100
@@ -7858,10 +7858,9 @@
    * @ingroup Callback
    **/
   typedef OrthancPluginReceivedInstanceCallbackResult (*OrthancPluginReceivedInstanceCallback) (
+    OrthancPluginMemoryBuffer64* modifiedDicomBuffer,
     const void* receivedDicomBuffer,
-    uint64_t receivedDicomBufferSize,
-    OrthancPluginMemoryBuffer64* modifiedDicomBuffer
-    );
+    uint64_t receivedDicomBufferSize);
 
 
   typedef struct
--- a/OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp	Tue Feb 22 22:14:31 2022 +0100
+++ b/OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp	Tue Feb 22 22:18:54 2022 +0100
@@ -33,9 +33,9 @@
 
 
 
-OrthancPluginReceivedInstanceCallbackResult ReceivedInstanceCallback(const void* receivedDicomBuffer,
-                                                                     uint64_t receivedDicomBufferSize,
-                                                                     OrthancPluginMemoryBuffer64* modifiedDicomBuffer)
+OrthancPluginReceivedInstanceCallbackResult ReceivedInstanceCallback(OrthancPluginMemoryBuffer64* modifiedDicomBuffer,
+                                                                     const void* receivedDicomBuffer,
+                                                                     uint64_t receivedDicomBufferSize)
 {
   Orthanc::ParsedDicomFile dicom(receivedDicomBuffer, receivedDicomBufferSize);
   std::string institutionName = "My institution";