diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Common/Backends/SystemBackendProc.h | 2 | ||||
-rw-r--r-- | src/Common/ConfigManager.h | 4 | ||||
-rw-r--r-- | src/Common/SystemBackend.h | 4 | ||||
-rw-r--r-- | src/Core/ConfigManager.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/Common/Backends/SystemBackendProc.h b/src/Common/Backends/SystemBackendProc.h index cdcc3e7..2a85b86 100644 --- a/src/Common/Backends/SystemBackendProc.h +++ b/src/Common/Backends/SystemBackendProc.h @@ -32,7 +32,7 @@ class SystemBackendProc : public SystemBackend { public: static void useBackend() { - setBackend(new SystemBackendProc()); + setBackend(std::auto_ptr<SystemBackend>(new SystemBackendProc())); } virtual UptimeInfo getUptimeInfo() const; diff --git a/src/Common/ConfigManager.h b/src/Common/ConfigManager.h index 91126ca..8bb4c87 100644 --- a/src/Common/ConfigManager.h +++ b/src/Common/ConfigManager.h @@ -36,8 +36,8 @@ class ConfigManager { initBackends(); } - static void setConfigManager(ConfigManager *configManager0) { - configManager = std::auto_ptr<ConfigManager>(configManager0); + static void setConfigManager(std::auto_ptr<ConfigManager> configManager0) { + configManager = configManager0; } virtual bool parseLine(const std::vector<std::string> §ion, const std::string &key, const std::string &value = std::string()) = 0; diff --git a/src/Common/SystemBackend.h b/src/Common/SystemBackend.h index 19b0715..8942ff0 100644 --- a/src/Common/SystemBackend.h +++ b/src/Common/SystemBackend.h @@ -33,8 +33,8 @@ class SystemBackend { protected: SystemBackend() {} - static void setBackend(SystemBackend *backend0) { - backend = std::auto_ptr<SystemBackend>(backend0); + static void setBackend(std::auto_ptr<SystemBackend> backend0) { + backend = backend0; } public: diff --git a/src/Core/ConfigManager.h b/src/Core/ConfigManager.h index 760312a..e089358 100644 --- a/src/Core/ConfigManager.h +++ b/src/Core/ConfigManager.h @@ -49,7 +49,7 @@ class ConfigManager : public Common::ConfigManager { public: static void useConfigManager() { - setConfigManager(new ConfigManager()); + setConfigManager(std::auto_ptr<Common::ConfigManager>(new ConfigManager())); } static ConfigManager *getConfigManager() { |