Index: code/trunk/src/libraries/core/ConfigFileManager.cc
===================================================================
--- code/trunk/src/libraries/core/ConfigFileManager.cc	(revision 5929)
+++ code/trunk/src/libraries/core/ConfigFileManager.cc	(revision 6417)
@@ -51,9 +51,14 @@
         if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
         {
-            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
-            if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
-                return (*variable).second->set(value);
+            std::map<std::string, ConfigValueContainer*>::const_iterator variable = identifier->second->getLowercaseConfigValueMap().find(getLowercase(varname));
+            if (variable != identifier->second->getLowercaseConfigValueMapEnd())
+                return variable->second->set(value);
         }
         return false;
+    }
+
+    std::string getConfig(const std::string& classname, const std::string& varname)
+    {
+        return ConfigFileManager::getInstance().getValue(ConfigFileType::Settings, classname, varname, "", true);
     }
 
@@ -63,7 +68,7 @@
         if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
         {
-            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
-            if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
-                return (*variable).second->tset(value);
+            std::map<std::string, ConfigValueContainer*>::const_iterator variable = identifier->second->getLowercaseConfigValueMap().find(getLowercase(varname));
+            if (variable != identifier->second->getLowercaseConfigValueMapEnd())
+                return variable->second->tset(value);
         }
         return false;
@@ -94,5 +99,5 @@
             this->value_ = value;
         else
-            this->value_ = "\"" + addSlashes(stripEnclosingQuotes(value)) + "\"";
+            this->value_ = '"' + addSlashes(stripEnclosingQuotes(value)) + '"';
     }
 
@@ -107,8 +112,8 @@
     std::string ConfigFileEntryValue::getFileEntry() const
     {
-        if (this->additionalComment_ == "" || this->additionalComment_.size() == 0)
-            return (this->name_ + "=" + this->value_);
-        else
-            return (this->name_ + "=" + this->value_ + " " + this->additionalComment_);
+        if (this->additionalComment_.empty())
+            return (this->name_ + '=' + this->value_);
+        else
+            return (this->name_ + '=' + this->value_ + " " + this->additionalComment_);
     }
 
@@ -119,8 +124,8 @@
     std::string ConfigFileEntryVectorValue::getFileEntry() const
     {
-        if (this->additionalComment_ == "" || this->additionalComment_.size() == 0)
-            return (this->name_ + "[" + multi_cast<std::string>(this->index_) + "]" + "=" + this->value_);
-        else
-            return (this->name_ + "[" + multi_cast<std::string>(this->index_) + "]=" + this->value_ + " " + this->additionalComment_);
+        if (this->additionalComment_.empty())
+            return (this->name_ + '[' + multi_cast<std::string>(this->index_) + ']' + '=' + this->value_);
+        else
+            return (this->name_ + '[' + multi_cast<std::string>(this->index_) + "]=" + this->value_ + ' ' + this->additionalComment_);
     }
 
@@ -166,8 +171,8 @@
     std::string ConfigFileSection::getFileEntry() const
     {
-        if (this->additionalComment_ == "" || this->additionalComment_.size() == 0)
-            return ("[" + this->name_ + "]");
-        else
-            return ("[" + this->name_ + "] " + this->additionalComment_);
+        if (this->additionalComment_.empty())
+            return ('[' + this->name_ + ']');
+        else
+            return ('[' + this->name_ + "] " + this->additionalComment_);
     }
 
@@ -246,5 +251,5 @@
                 std::getline(file, line);
 
-                std::string temp = getStripped(line);
+                const std::string& temp = getStripped(line);
                 if (!isEmpty(temp) && !isComment(temp))
                 {
@@ -256,5 +261,5 @@
                     {
                         // New section
-                        std::string comment = line.substr(pos2 + 1);
+                        const std::string& comment = line.substr(pos2 + 1);
                         if (isComment(comment))
                             newsection = new ConfigFileSection(line.substr(pos1 + 1, pos2 - pos1 - 1), comment);
@@ -288,5 +293,5 @@
                                 commentposition = getNextCommentPosition(line, commentposition + 1);
                             }
-                            std::string value = "", comment = "";
+                            std::string value, comment;
                             if (commentposition == std::string::npos)
                             {
@@ -377,5 +382,5 @@
         {
             std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getStringIdentifierMap().find((*it1)->getName());
-            if (it2 != Identifier::getStringIdentifierMapEnd() && (*it2).second->hasConfigValues())
+            if (it2 != Identifier::getStringIdentifierMapEnd() && it2->second->hasConfigValues())
             {
                 // The section exists, delete comment
@@ -384,6 +389,6 @@
                 for (std::list<ConfigFileEntry*>::iterator it3 = (*it1)->entries_.begin(); it3 != (*it1)->entries_.end(); )
                 {
-                    std::map<std::string, ConfigValueContainer*>::const_iterator it4 = (*it2).second->getConfigValueMap().find((*it3)->getName());
-                    if (it4 != (*it2).second->getConfigValueMapEnd())
+                    std::map<std::string, ConfigValueContainer*>::const_iterator it4 = it2->second->getConfigValueMap().find((*it3)->getName());
+                    if (it4 != it2->second->getConfigValueMapEnd())
                     {
                         // The config-value exists, delete comment
@@ -459,5 +464,5 @@
                 if (it->second->hasConfigValues())
                 {
-                    for (std::map<std::string, ConfigValueContainer*>::const_iterator it2 = (*it).second->getConfigValueMapBegin(); it2 != (*it).second->getConfigValueMapEnd(); ++it2)
+                    for (std::map<std::string, ConfigValueContainer*>::const_iterator it2 = it->second->getConfigValueMapBegin(); it2 != it->second->getConfigValueMapEnd(); ++it2)
                         it2->second->update();
 
