Mercurial > hg > orthanc
diff OrthancServer/main.cpp @ 2079:acb4cd4af771
Performance warning if runtime debug assertions are turned on
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 07 Sep 2016 09:03:37 +0200 |
parents | fabf7820d1f1 |
children | a43708636890 |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Wed Aug 31 17:35:38 2016 +0200 +++ b/OrthancServer/main.cpp Wed Sep 07 09:03:37 2016 +0200 @@ -1086,6 +1086,14 @@ } +static bool DisplayPerformanceWarning() +{ + (void) DisplayPerformanceWarning; // Disable warning about unused function + LOG(WARNING) << "Performance warning: Non-release build, runtime debug assertions are turned on"; + return true; +} + + int main(int argc, char* argv[]) { Logging::Initialize(); @@ -1225,6 +1233,7 @@ } LOG(WARNING) << "Orthanc version: " << version; + assert(DisplayPerformanceWarning()); } int status = 0;