logic: Cleaned up LogManager and setupLogging call
This commit is contained in:
@@ -7,20 +7,8 @@
|
||||
#include "utility/messaging/type/MessageStatus.h"
|
||||
#include "utility/Version.h"
|
||||
|
||||
std::shared_ptr<LogManager> LogManager::createInstance()
|
||||
{
|
||||
if (s_instance.use_count() == 0)
|
||||
{
|
||||
s_instance = std::shared_ptr<LogManager>(new LogManager());
|
||||
}
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
// what is this method for? why would you want to risk returning s_instance without checking whether it is initialized???
|
||||
std::shared_ptr<LogManager> LogManager::getInstance()
|
||||
{
|
||||
// return s_instance; // original implementation
|
||||
|
||||
if (s_instance.use_count() == 0)
|
||||
{
|
||||
s_instance = std::shared_ptr<LogManager>(new LogManager());
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
class LogManager
|
||||
{
|
||||
public:
|
||||
static std::shared_ptr<LogManager> createInstance();
|
||||
static std::shared_ptr<LogManager> getInstance();
|
||||
static void destroyInstance();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user