[Orxonox-commit 1116] r5837 - code/branches/core5/src/libraries/core

rgrieder at orxonox.net rgrieder at orxonox.net
Wed Sep 30 00:13:01 CEST 2009


Author: rgrieder
Date: 2009-09-30 00:13:01 +0200 (Wed, 30 Sep 2009)
New Revision: 5837

Modified:
   code/branches/core5/src/libraries/core/CommandLine.cc
   code/branches/core5/src/libraries/core/Language.cc
Log:
Removed two unnecessary boost/filesystem.hpp includes.

Modified: code/branches/core5/src/libraries/core/CommandLine.cc
===================================================================
--- code/branches/core5/src/libraries/core/CommandLine.cc	2009-09-29 22:00:16 UTC (rev 5836)
+++ code/branches/core5/src/libraries/core/CommandLine.cc	2009-09-29 22:13:01 UTC (rev 5837)
@@ -30,7 +30,6 @@
 
 #include <algorithm>
 #include <sstream>
-#include <boost/filesystem.hpp>
 
 #include "util/Convert.h"
 #include "util/Debug.h"
@@ -347,12 +346,11 @@
     void CommandLine::_parseFile()
     {
         std::string filename = CommandLine::getValue("optionsFile").getString();
-        boost::filesystem::path filepath(PathConfig::getConfigPath() / filename);
 
         // look for additional arguments in given file or start.ini as default
         // They will not overwrite the arguments given directly
         std::ifstream file;
-        file.open(filepath.string().c_str());
+        file.open((PathConfig::getConfigPathString() + filename).c_str());
         std::vector<std::string> args;
         if (file)
         {

Modified: code/branches/core5/src/libraries/core/Language.cc
===================================================================
--- code/branches/core5/src/libraries/core/Language.cc	2009-09-29 22:00:16 UTC (rev 5836)
+++ code/branches/core5/src/libraries/core/Language.cc	2009-09-29 22:13:01 UTC (rev 5837)
@@ -34,8 +34,6 @@
 #include "Language.h"
 
 #include <fstream>
-#include <boost/filesystem.hpp>
-
 #include "util/Debug.h"
 #include "Core.h"
 #include "PathConfig.h"
@@ -200,16 +198,16 @@
     {
         COUT(4) << "Read default language file." << std::endl;
 
-        boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(this->defaultLanguage_));
+        std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
 
         // This creates the file if it's not existing
         std::ofstream createFile;
-        createFile.open(filepath.string().c_str(), std::fstream::app);
+        createFile.open(filepath.c_str(), std::fstream::app);
         createFile.close();
 
         // Open the file
         std::ifstream file;
-        file.open(filepath.string().c_str(), std::fstream::in);
+        file.open(filepath.c_str(), std::fstream::in);
 
         if (!file.is_open())
         {
@@ -249,11 +247,11 @@
     {
         COUT(4) << "Read translated language file (" << Core::getLanguage() << ")." << std::endl;
 
-        boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(Core::getLanguage()));
+        std::string filepath = PathConfig::getConfigPathString() + getFilename(Core::getLanguage());
 
         // Open the file
         std::ifstream file;
-        file.open(filepath.string().c_str(), std::fstream::in);
+        file.open(filepath.c_str(), std::fstream::in);
 
         if (!file.is_open())
         {
@@ -303,11 +301,11 @@
     {
         COUT(4) << "Language: Write default language file." << std::endl;
 
-        boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(this->defaultLanguage_));
+        std::string filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
 
         // Open the file
         std::ofstream file;
-        file.open(filepath.string().c_str(), std::fstream::out);
+        file.open(filepath.c_str(), std::fstream::out);
 
         if (!file.is_open())
         {




More information about the Orxonox-commit mailing list