diff Plugin/Plugin.cpp @ 143:16f8471e3872

Performance warning if runtime debug assertions are turned on
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 07 Sep 2016 09:13:53 +0200
parents 3251ec958a29
children 70d1fe6d6309
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Wed Jul 20 13:01:30 2016 +0200
+++ b/Plugin/Plugin.cpp	Wed Sep 07 09:13:53 2016 +0200
@@ -530,6 +530,14 @@
 }
 
 
+static bool DisplayPerformanceWarning()
+{
+  (void) DisplayPerformanceWarning;   // Disable warning about unused function
+  OrthancPluginLogWarning(context_, "Performance warning in Web viewer: "
+                          "Non-release build, runtime debug assertions are turned on");
+  return true;
+}
+
 
 extern "C"
 {
@@ -538,6 +546,7 @@
     using namespace OrthancPlugins;
 
     context_ = context;
+    assert(DisplayPerformanceWarning());
     OrthancPluginLogWarning(context_, "Initializing the Web viewer");