aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgFunctionObject.h
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2022-05-20 19:13:55 +0000
committerGitHub <[email protected]>2022-05-20 19:13:55 +0000
commit306cc5b41af9596875c2999af638eaa35899e404 (patch)
tree6d8d5b3cdb35e79527d33c63d4e69995f9c3f2df /src/core/GpgFunctionObject.h
parentMerge pull request #65 from saturneric/develop-2.0.8 (diff)
parentfix(ui): there is possible null pointer dereference (diff)
downloadGpgFrontend-306cc5b41af9596875c2999af638eaa35899e404.tar.gz
GpgFrontend-306cc5b41af9596875c2999af638eaa35899e404.zip
Merge pull request #66 from saturneric/develop-2.0.8
Develop 2.0.8.2
Diffstat (limited to '')
-rw-r--r--src/core/GpgFunctionObject.h22
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