]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Settings.cc
no more useless singleton class
[chaz/yoink] / src / Moof / Settings.cc
index ccf690af65e395f93142a08eb891cde8e7a31c77..ad9c3b0fdebbb9b9eaf14a4ae5d752cad1acb278 100644 (file)
@@ -44,9 +44,16 @@ Settings::Settings(int argc, char* argv[])
 }
 
 
+Settings& Settings::getInstance()
+{
+       static Settings settings;
+       return settings;
+}
+
+
 void Settings::parseArgs(int argc, char* argv[])
 {
-       for (int i = 1; i < argc; i++)
+       for (int i = 1; i < argc; ++i)
        {
                char* where = strchr(argv[i], (int)'=');
 
@@ -91,7 +98,7 @@ void Settings::loadFromFiles(const std::vector<std::string>& filePaths,
 
        char* home = getenv("HOME");
 
-       for (it = filePaths.begin(); it != filePaths.end(); it++)
+       for (it = filePaths.begin(); it != filePaths.end(); ++it)
        {
                std::string path = *it;
 
This page took 0.022324 seconds and 4 git commands to generate.