Changeset 2662 for code/trunk/src/core/Language.cc
- Timestamp:
- Feb 14, 2009, 10:17:35 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/core/Language.cc
r2171 r2662 87 87 // ### Language ### 88 88 // ############################### 89 90 Language* Language::singletonRef_s = 0; 91 89 92 /** 90 93 @brief Constructor: Reads the default language file and sets some values. … … 92 95 Language::Language() 93 96 { 97 assert(singletonRef_s == 0); 98 singletonRef_s = this; 99 94 100 this->defaultLanguage_ = "default"; 95 101 this->defaultLocalisation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!"; … … 106 112 for (std::map<std::string, LanguageEntry*>::iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it) 107 113 delete (it->second); 108 } 109 110 /** 111 @brief Returns a reference to the only existing instance of the Language class and calls the setConfigValues() function. 112 @return The reference to the only existing instance 113 */ 114 Language& Language::getLanguage() 115 { 116 static Language instance = Language(); 117 return instance; 114 115 assert(singletonRef_s); 116 singletonRef_s = 0; 118 117 } 119 118 … … 233 232 if ((lineString != "") && (lineString.size() > 0)) 234 233 { 235 unsigned int pos = lineString.find('=');234 size_t pos = lineString.find('='); 236 235 237 236 // Check if the length is at least 3 and if there's an entry before and behind the = … … 279 278 if ((lineString != "") && (lineString.size() > 0)) 280 279 { 281 unsigned int pos = lineString.find('=');280 size_t pos = lineString.find('='); 282 281 283 282 // Check if the length is at least 3 and if there's an entry before and behind the =
Note: See TracChangeset
for help on using the changeset viewer.