Changeset 3253 for code/branches/core4/src/core
- Timestamp:
- Jun 29, 2009, 10:00:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/Core.cc
r3248 r3253 229 229 Core::Core(int argc, char** argv) 230 230 { 231 assert(Core::singletonRef_s == 0); 231 if (singletonRef_s != 0) 232 { 233 COUT(0) << "Error: The Core singleton cannot be recreated! Shutting down." << std::endl; 234 abort(); 235 } 232 236 Core::singletonRef_s = this; 233 237 … … 264 268 int limitToCPU = CommandLine::getValue("limitToCPU"); 265 269 if (limitToCPU > 0) 266 setThreadAffinity( (unsigned int)limitToCPU);270 setThreadAffinity(static_cast<unsigned int>(limitToCPU)); 267 271 268 272 // Manage ini files and set the default settings file (usually orxonox.ini) … … 271 275 CommandLine::getValue("settingsFile").getString()); 272 276 277 // Required as well for the config values 273 278 this->languageInstance_ = new Language(); 274 279 … … 308 313 // Also delete external console command that don't belong to an Identifier 309 314 CommandExecutor::destroyExternalCommands(); 310 311 315 // Clean up class hierarchy stuff (identifiers, XMLPort, configValues, consoleCommand) 312 316 Identifier::destroyAllIdentifiers(); 313 317 314 assert(Core::singletonRef_s);315 Core::singletonRef_s = 0;316 318 delete this->signalHandler_; 319 320 // Don't assign singletonRef_s with NULL! Recreation is not supported 317 321 } 318 322
Note: See TracChangeset
for help on using the changeset viewer.