Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 30, 2009, 12:00:16 AM (15 years ago)
Author:
rgrieder
Message:

Extracted path related parts of Core into a new PathConfig class. This should decrease the mess in Core.cc a little bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/tools/ResourceLocation.cc

    r5747 r5836  
    3333
    3434#include "util/Exception.h"
    35 #include "core/Core.h"
    3635#include "core/CoreIncludes.h"
     36#include "core/PathConfig.h"
    3737#include "core/XMLFile.h"
    3838#include "core/XMLPort.h"
     
    7171
    7272        // Find the path
    73         boost::filesystem::path path;
    74         if (boost::filesystem::exists(Core::getDataPath() / this->getPath()))
    75             path = Core::getDataPath() / this->getPath();
    76         else if (Core::isDevelopmentRun() && boost::filesystem::exists(Core::getExternalDataPath() / this->getPath()))
    77             path = Core::getExternalDataPath() / this->getPath();
     73        namespace bf = boost::filesystem;
     74        bf::path path;
     75        if (bf::exists(PathConfig::getDataPath() / this->getPath()))
     76            path = PathConfig::getDataPath() / this->getPath();
     77        else if (PathConfig::isDevelopmentRun() && bf::exists(PathConfig::getExternalDataPath() / this->getPath()))
     78            path = PathConfig::getExternalDataPath() / this->getPath();
    7879        else
    7980        {
Note: See TracChangeset for help on using the changeset viewer.