don't use an instance
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 5 Jul 2008 13:53:18 +0000 (15:53 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 5 Jul 2008 13:53:18 +0000 (15:53 +0200)
GlobalSettings.cpp
GlobalSettings.h

index ba44fbc..214d90e 100644 (file)
@@ -4,28 +4,11 @@
 
 #include "GlobalSettings.h"
 
-GlobalSettings::GlobalSettings() {
-       verbose = false;
-}
-
-GlobalSettings::~GlobalSettings() {
-}
-
-GlobalSettings* GlobalSettings::instance = 0;
-
-GlobalSettings* GlobalSettings::getInstance() {
-       if (instance) {
-               return instance;
-       }
-       instance = new GlobalSettings();
-       return instance;
-}
-
 bool GlobalSettings::isVerbose() {
        return verbose;
 }
 
 void GlobalSettings::setVerbose(bool verbose) {
-       this->verbose = verbose;
+       GlobalSettings::verbose = verbose;
 }
 
index 8eaa1cd..b34052a 100644 (file)
@@ -6,19 +6,12 @@
 
 class GlobalSettings {
 
-private:
-       GlobalSettings();
-       ~GlobalSettings();
-
 public:
-       static GlobalSettings* getInstance();
-
-       bool isVerbose();
-       void setVerbose(bool verbose);
+       static bool isVerbose();
+       static void setVerbose(bool verbose);
 
 private:
-       static GlobalSettings* instance;
-       bool verbose;
+       static bool verbose;
 
 };