# HG changeset patch # User s.jodogne@gmail.com # Date 1560323076 -7200 # Node ID e2b032584a832dcd92c9d99f95dc29948d71d34b # Parent ad263225187c2a58b04744c4b02ff2b367d623f1 fix for msvc 2008 diff -r ad263225187c -r e2b032584a83 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp --- 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(diff.total_milliseconds()), OrthancPluginMetricsType_Timer); } #endif diff -r ad263225187c -r e2b032584a83 Plugins/Samples/Common/OrthancPluginCppWrapper.h --- 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 - 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, - PostHandler == Internals::NullChunkedRestCallback ? NULL : Internals::Protect, + PostHandler == Internals::NullChunkedRestCallback ? NULL : Internals::ChunkedProtect, DeleteHandler == Internals::NullRestCallback ? NULL : Internals::Protect, - PutHandler == Internals::NullChunkedRestCallback ? NULL : Internals::Protect, + PutHandler == Internals::NullChunkedRestCallback ? NULL : Internals::ChunkedProtect, 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 }