mirror of
https://github.com/glest/glest-source.git
synced 2025-08-19 14:41:23 +02:00
- try to optimize debug flag checking
This commit is contained in:
@@ -213,24 +213,21 @@ void SystemFlags::globalCleanupHTTP() {
|
||||
}
|
||||
}
|
||||
|
||||
SystemFlags::SystemFlagsType & SystemFlags::getSystemSettingType(DebugType type) {
|
||||
if(SystemFlags::debugLogFileList == NULL) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::SystemFlagsType * SystemFlags::setupRequiredMembers() {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
if(threadLogger == NULL && SystemFlags::SHUTDOWN_PROGRAM_MODE == true) {
|
||||
//throw megaglest_runtime_error("threadLogger == NULL && SystemFlags::SHUTDOWN_PROGRAM_MODE == true");
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] ERROR threadLogger == NULL && SystemFlags::SHUTDOWN_PROGRAM_MODE == true\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
//static SystemFlagsType *result = new SystemFlagsType();
|
||||
static SystemFlagsType result;
|
||||
result.enabled = SystemFlags::VERBOSE_MODE_ENABLED;
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
SystemFlags::init(false);
|
||||
}
|
||||
if(threadLogger == NULL && SystemFlags::SHUTDOWN_PROGRAM_MODE == true) {
|
||||
//throw megaglest_runtime_error("threadLogger == NULL && SystemFlags::SHUTDOWN_PROGRAM_MODE == true");
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] ERROR threadLogger == NULL && SystemFlags::SHUTDOWN_PROGRAM_MODE == true\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
//static SystemFlagsType *result = new SystemFlagsType();
|
||||
static SystemFlags::SystemFlagsType result;
|
||||
result.enabled = SystemFlags::VERBOSE_MODE_ENABLED;
|
||||
return &result;
|
||||
}
|
||||
else {
|
||||
SystemFlags::init(false);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (*debugLogFileList)[type];
|
||||
}
|
||||
|
||||
void SystemFlags::init(bool haveSpecialOutputCommandLineOption) {
|
||||
|
Reference in New Issue
Block a user