comparison 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
comparison
equal deleted inserted replaced
142:d9e3f7bb9986 143:16f8471e3872
528 } 528 }
529 529
530 } 530 }
531 531
532 532
533 static bool DisplayPerformanceWarning()
534 {
535 (void) DisplayPerformanceWarning; // Disable warning about unused function
536 OrthancPluginLogWarning(context_, "Performance warning in Web viewer: "
537 "Non-release build, runtime debug assertions are turned on");
538 return true;
539 }
540
533 541
534 extern "C" 542 extern "C"
535 { 543 {
536 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) 544 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context)
537 { 545 {
538 using namespace OrthancPlugins; 546 using namespace OrthancPlugins;
539 547
540 context_ = context; 548 context_ = context;
549 assert(DisplayPerformanceWarning());
541 OrthancPluginLogWarning(context_, "Initializing the Web viewer"); 550 OrthancPluginLogWarning(context_, "Initializing the Web viewer");
542 551
543 552
544 /* Check the version of the Orthanc core */ 553 /* Check the version of the Orthanc core */
545 if (OrthancPluginCheckVersion(context_) == 0) 554 if (OrthancPluginCheckVersion(context_) == 0)