Index: code/branches/cpp11_v3/src/libraries/core/config/ConfigFile.cc
===================================================================
--- code/branches/cpp11_v3/src/libraries/core/config/ConfigFile.cc	(revision 11053)
+++ code/branches/cpp11_v3/src/libraries/core/config/ConfigFile.cc	(revision 11054)
@@ -35,4 +35,8 @@
 
 #include <boost/filesystem.hpp>
+
+#include <iterator>
+#include <algorithm>
+#include <fstream>
 
 #include "util/Convert.h"
@@ -93,5 +97,7 @@
                         try
                         {
-                            boost::filesystem::copy_file(defaultFilepath, filepath);
+                            std::ifstream input(defaultFilepath.string().c_str(), std::ifstream::in | std::ifstream::binary);
+                            std::ofstream output(filepath.string().c_str(), std::ofstream::out | std::ofstream::binary);
+                            copy(std::istreambuf_iterator<char>(input), std::istreambuf_iterator<char>(), std::ostream_iterator<char>(output));
                             orxout(internal_info, context::config) << "Copied " << this->filename_ << " from the default config folder." << endl;
                         }
@@ -108,5 +114,5 @@
         if (file.is_open())
         {
-            ConfigFileSection* newsection = 0;
+            ConfigFileSection* newsection = nullptr;
 
             while (file.good() && !file.eof())
@@ -135,5 +141,5 @@
                 }
 
-                if (newsection != 0)
+                if (newsection != nullptr)
                 {
                     if (isComment(line))
@@ -228,9 +234,9 @@
         }
 
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            file << (*it)->getFileEntry() << endl;
-
-            for (std::list<ConfigFileEntry*>::const_iterator it_entries = (*it)->getEntriesBegin(); it_entries != (*it)->getEntriesEnd(); ++it_entries)
+        for (ConfigFileSection* section : this->sections_)
+        {
+            file << section->getFileEntry() << endl;
+
+            for (std::list<ConfigFileEntry*>::const_iterator it_entries = section->getEntriesBegin(); it_entries != section->getEntriesEnd(); ++it_entries)
                 file << (*it_entries)->getFileEntry() << endl;
 
@@ -270,12 +276,12 @@
 
     /**
-        @brief Returns a pointer to the section with given name (or NULL if the section doesn't exist).
-    */
-    ConfigFileSection* ConfigFile::getSection(const std::string& section) const
-    {
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
-        return NULL;
+        @brief Returns a pointer to the section with given name (or nullptr if the section doesn't exist).
+    */
+    ConfigFileSection* ConfigFile::getSection(const std::string& sectionName) const
+    {
+        for (ConfigFileSection* section : this->sections_)
+            if (section->getName() == sectionName)
+                return section;
+        return nullptr;
     }
 
@@ -283,13 +289,13 @@
         @brief Returns a pointer to the section with given name. If it doesn't exist, the section is created.
     */
-    ConfigFileSection* ConfigFile::getOrCreateSection(const std::string& section)
-    {
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
+    ConfigFileSection* ConfigFile::getOrCreateSection(const std::string& sectionName)
+    {
+        for (ConfigFileSection* section : this->sections_)
+            if (section->getName() == sectionName)
+                return section;
 
         this->bUpdated_ = true;
 
-        return (*this->sections_.insert(this->sections_.end(), new ConfigFileSection(section)));
+        return (*this->sections_.insert(this->sections_.end(), new ConfigFileSection(sectionName)));
     }
 
@@ -301,10 +307,10 @@
         bool sectionsUpdated = false;
 
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            if ((*it)->bUpdated_)
+        for (ConfigFileSection* section : this->sections_)
+        {
+            if (section->bUpdated_)
             {
                 sectionsUpdated = true;
-                (*it)->bUpdated_ = false;
+                section->bUpdated_ = false;
             }
         }
