# HG changeset patch # User Sebastien Jodogne # Date 1473231817 -7200 # Node ID acb4cd4af771a9dbb6b220848e4bb6cd152c31cd # Parent 14ce887a9182a2442c3cf9fef83b70e648cda0d5 Performance warning if runtime debug assertions are turned on diff -r 14ce887a9182 -r acb4cd4af771 OrthancServer/main.cpp --- 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;