diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/GpgFunctionObject.h | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/core/GpgFunctionObject.h b/src/core/GpgFunctionObject.h index f16e4cae..de27ea42 100644 --- a/src/core/GpgFunctionObject.h +++ b/src/core/GpgFunctionObject.h @@ -29,18 +29,7 @@ #ifndef GPGFRONTEND_ZH_CN_TS_FUNCTIONOBJECT_H #define GPGFRONTEND_ZH_CN_TS_FUNCTIONOBJECT_H -#include <map> -#include <memory> -#include <mutex> -#include <shared_mutex> -#include <stdexcept> -#include <string> -#include <typeinfo> -#include <utility> -#include <vector> - #include "GpgConstants.h" -#include "easylogging++.h" namespace GpgFrontend { @@ -189,14 +178,12 @@ class SingletonFunctionObject : public ChannelObject { auto* _p_pbj = (T*)(p_storage->FindObjectInChannel(channel)); - LOG(INFO) << "object address" << _p_pbj; - if (_p_pbj == nullptr) { auto new_obj = std::unique_ptr<ChannelObject>(new T(channel)); - LOG(INFO) << "create new object"; return *(T*)(p_storage->SetObjectInChannel(channel, std::move(new_obj))); - } else + } else { return *_p_pbj; + } } /** @@ -292,10 +279,7 @@ class SingletonFunctionObject : public ChannelObject { * * @param channel */ - explicit SingletonFunctionObject(int channel) : ChannelObject(channel) { - LOG(INFO) << "called" - << "channel:" << channel; - } + explicit SingletonFunctionObject(int channel) : ChannelObject(channel) {} /** * @brief Destroy the Singleton Function Object object |