changeset 3418:e2b032584a83

fix for msvc 2008
author s.jodogne@gmail.com
date Wed, 12 Jun 2019 09:04:36 +0200
parents ad263225187c
children af271172cc36
files Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Plugins/Samples/Common/OrthancPluginCppWrapper.h
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Tue Jun 11 21:51:18 2019 +0200
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Wed Jun 12 09:04:36 2019 +0200
@@ -2070,7 +2070,7 @@
   {
     const boost::posix_time::ptime stop = boost::posix_time::microsec_clock::universal_time();
     const boost::posix_time::time_duration diff = stop - start_;
-    OrthancPluginSetMetricsValue(GetGlobalContext(), name_.c_str(), diff.total_milliseconds(),
+    OrthancPluginSetMetricsValue(GetGlobalContext(), name_.c_str(), static_cast<float>(diff.total_milliseconds()),
                                  OrthancPluginMetricsType_Timer);
   }
 #endif
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Tue Jun 11 21:51:18 2019 +0200
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Wed Jun 12 09:04:36 2019 +0200
@@ -950,9 +950,9 @@
 
 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER == 1
     template <ChunkedRestCallback Callback>
-    static OrthancPluginErrorCode Protect(OrthancPluginServerChunkedRequestReader** reader,
-                                          const char* url,
-                                          const OrthancPluginHttpRequest* request)
+    static OrthancPluginErrorCode ChunkedProtect(OrthancPluginServerChunkedRequestReader** reader,
+                                                const char* url,
+                                                const OrthancPluginHttpRequest* request)
     {
       try
       {
@@ -1044,9 +1044,9 @@
       OrthancPluginRegisterChunkedRestCallback(
         GetGlobalContext(), uri.c_str(),
         GetHandler == Internals::NullRestCallback         ? NULL : Internals::Protect<GetHandler>,
-        PostHandler == Internals::NullChunkedRestCallback ? NULL : Internals::Protect<PostHandler>,
+        PostHandler == Internals::NullChunkedRestCallback ? NULL : Internals::ChunkedProtect<PostHandler>,
         DeleteHandler == Internals::NullRestCallback      ? NULL : Internals::Protect<DeleteHandler>,
-        PutHandler == Internals::NullChunkedRestCallback  ? NULL : Internals::Protect<PutHandler>,
+        PutHandler == Internals::NullChunkedRestCallback  ? NULL : Internals::ChunkedProtect<PutHandler>,
         Internals::ChunkedRequestReaderAddChunk,
         Internals::ChunkedRequestReaderExecute,
         Internals::ChunkedRequestReaderFinalize);
@@ -1056,7 +1056,7 @@
       
       OrthancPluginRegisterRestCallback(
         GetGlobalContext(), uri.c_str(), 
-        Internals::Protect< Internals::ChunkedRestCompatibility<
+        Internals::ChunkedProtect< Internals::ChunkedRestCompatibility<
         GetHandler, PostHandler, DeleteHandler, PutHandler> >);
 #endif
     }