mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 23:19:07 +02:00
- performance changes... (problem found by titi) most debug calls line are skipped when the debug flag is disabled even BEFORE getting into the handledebug method.
This improves performance VERY MUCH.
This commit is contained in:
@@ -46,16 +46,12 @@ void Properties::load(const string &path){
|
||||
|
||||
this->path= path;
|
||||
|
||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
|
||||
|
||||
fileStream.open(path.c_str(), ios_base::in);
|
||||
if(fileStream.fail()){
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
|
||||
throw runtime_error("Can't open propertyMap file: " + path);
|
||||
}
|
||||
|
||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] path = [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str());
|
||||
|
||||
propertyMap.clear();
|
||||
while(!fileStream.eof()){
|
||||
fileStream.getline(lineBuffer, maxLine);
|
||||
|
Reference in New Issue
Block a user