comparison 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
comparison
equal deleted inserted replaced
2077:14ce887a9182 2079:acb4cd4af771
1084 { 1084 {
1085 return ConfigurePlugins(argc, argv, allowDatabaseUpgrade); 1085 return ConfigurePlugins(argc, argv, allowDatabaseUpgrade);
1086 } 1086 }
1087 1087
1088 1088
1089 static bool DisplayPerformanceWarning()
1090 {
1091 (void) DisplayPerformanceWarning; // Disable warning about unused function
1092 LOG(WARNING) << "Performance warning: Non-release build, runtime debug assertions are turned on";
1093 return true;
1094 }
1095
1096
1089 int main(int argc, char* argv[]) 1097 int main(int argc, char* argv[])
1090 { 1098 {
1091 Logging::Initialize(); 1099 Logging::Initialize();
1092 1100
1093 bool allowDatabaseUpgrade = false; 1101 bool allowDatabaseUpgrade = false;
1223 { 1231 {
1224 } 1232 }
1225 } 1233 }
1226 1234
1227 LOG(WARNING) << "Orthanc version: " << version; 1235 LOG(WARNING) << "Orthanc version: " << version;
1236 assert(DisplayPerformanceWarning());
1228 } 1237 }
1229 1238
1230 int status = 0; 1239 int status = 0;
1231 try 1240 try
1232 { 1241 {