Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1756 for code/trunk


Ignore:
Timestamp:
Sep 10, 2008, 2:11:01 AM (16 years ago)
Author:
rgrieder
Message:

Fixed a bug in Core.cc when creating it via getInstance directly for the first time.

Location:
code/trunk/src/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/Core.cc

    r1755 r1756  
    3333
    3434#include "Core.h"
     35#include <cassert>
    3536#include "Language.h"
    3637#include "CoreIncludes.h"
     
    8081    Core& Core::getInstance()
    8182    {
    82         static Core instance = Core();
     83        static Core instance;
    8384
    8485        // If bCreatingSoftDebugLevelObject is true, we're just about to create an instance of the DebugLevel class
    85         if (Core::isCreatingCoreSettings())
    86         {
    87             isCreatingCoreSettings() = false;
    88             instance.setConfigValues();
    89         }
     86        //if (Core::isCreatingCoreSettings())
     87        //{
     88        //    isCreatingCoreSettings() = false;
     89        //    instance.setConfigValues();
     90        //}
    9091        return instance;
    9192    }
     
    138139        if (!Core::isCreatingCoreSettings())
    139140        {
    140             if (device == OutputHandler::LD_All)
     141            switch (device)
     142            {
     143            case OutputHandler::LD_All:
    141144                return Core::getInstance().softDebugLevel_;
    142             else if (device == OutputHandler::LD_Console)
     145            case OutputHandler::LD_Console:
    143146                return Core::getInstance().softDebugLevelConsole_;
    144             else if (device == OutputHandler::LD_Logfile)
     147            case OutputHandler::LD_Logfile:
    145148                return Core::getInstance().softDebugLevelLogfile_;
    146             else if (device == OutputHandler::LD_Shell)
     149            case OutputHandler::LD_Shell:
    147150                return Core::getInstance().softDebugLevelShell_;
     151            default:
     152                assert(0);
     153            }
    148154        }
    149155
  • code/trunk/src/core/RootGameState.cc

    r1755 r1756  
    134134        // start global orxonox time
    135135        Clock clock;
     136
     137        // create the Core settings to configure the output level
     138        Core::getInstance();
    136139
    137140        parseArguments(argc, argv);
Note: See TracChangeset for help on using the changeset viewer.