Mercurial > hg > orthanc-dicomweb
changeset 160:ba55b35b20ea
Performance warning if runtime debug assertions are turned on
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 07 Sep 2016 09:20:04 +0200 |
parents | 7b67cfa8a3aa |
children | 4f543f8b9b5d |
files | NEWS Plugin/Plugin.cpp |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Wed Jul 20 13:49:49 2016 +0200 +++ b/NEWS Wed Sep 07 09:20:04 2016 +0200 @@ -1,6 +1,8 @@ Pending changes in the mainline =============================== +* Performance warning if runtime debug assertions are turned on + Version 0.3 (2016/06/28) ========================
--- a/Plugin/Plugin.cpp Wed Jul 20 13:49:49 2016 +0200 +++ b/Plugin/Plugin.cpp Wed Sep 07 09:20:04 2016 +0200 @@ -140,10 +140,21 @@ } +static bool DisplayPerformanceWarning(OrthancPluginContext* context) +{ + (void) DisplayPerformanceWarning; // Disable warning about unused function + OrthancPluginLogWarning(context, "Performance warning in DICOMweb: " + "Non-release build, runtime debug assertions are turned on"); + return true; +} + + extern "C" { ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { + assert(DisplayPerformanceWarning(context)); + /* Check the version of the Orthanc core */ if (OrthancPluginCheckVersion(context) == 0) {