aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/GpgFunctionObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpg/GpgFunctionObject.h')
-rw-r--r--src/gpg/GpgFunctionObject.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpg/GpgFunctionObject.h b/src/gpg/GpgFunctionObject.h
index d81371d9..404b2f84 100644
--- a/src/gpg/GpgFunctionObject.h
+++ b/src/gpg/GpgFunctionObject.h
@@ -34,12 +34,15 @@
#include <stdexcept>
#include <string>
+#include "GpgConstants.h"
+
namespace GpgFrontend {
template <typename T>
class SingletonFunctionObject {
public:
- static T& GetInstance(int channel = 0) {
+ static T& GetInstance(
+ int channel = GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL) {
static_assert(std::is_base_of<SingletonFunctionObject<T>, T>::value,
"T not derived from SingletonFunctionObject<T>");
@@ -138,7 +141,8 @@ class SingletonFunctionObject {
};
template <typename T>
-int SingletonFunctionObject<T>::_default_channel = 0;
+int SingletonFunctionObject<T>::_default_channel =
+ GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL;
template <typename T>
std::mutex SingletonFunctionObject<T>::_instance_mutex;