aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/module
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-10-23 10:27:25 +0000
committersaturneric <[email protected]>2023-10-23 10:27:25 +0000
commit8fdeb3af49999f29e017b7f7a70bd36f020ba721 (patch)
treedb90267c3c88d488570a8e359bd511b64c5686d8 /src/core/module
parentfeat: improve project structure and add GRT for modules (diff)
downloadGpgFrontend-8fdeb3af49999f29e017b7f7a70bd36f020ba721.tar.gz
GpgFrontend-8fdeb3af49999f29e017b7f7a70bd36f020ba721.zip
perf: reduce header includes and improve build speed
Diffstat (limited to 'src/core/module')
-rw-r--r--src/core/module/Event.h3
-rw-r--r--src/core/module/GlobalModuleContext.cpp16
-rw-r--r--src/core/module/GlobalModuleContext.h2
-rw-r--r--src/core/module/GlobalRegisterTable.h3
-rw-r--r--src/core/module/Module.cpp2
5 files changed, 16 insertions, 10 deletions
diff --git a/src/core/module/Event.h b/src/core/module/Event.h
index 09514003..4adfc959 100644
--- a/src/core/module/Event.h
+++ b/src/core/module/Event.h
@@ -28,6 +28,9 @@
#pragma once
+#include <any>
+#include <optional>
+
#include "core/GpgFrontendCore.h"
namespace GpgFrontend::Module {
diff --git a/src/core/module/GlobalModuleContext.cpp b/src/core/module/GlobalModuleContext.cpp
index 10c3e549..de1e244b 100644
--- a/src/core/module/GlobalModuleContext.cpp
+++ b/src/core/module/GlobalModuleContext.cpp
@@ -28,12 +28,10 @@
#include "GlobalModuleContext.h"
-#include <boost/format/format_fwd.hpp>
-#include <boost/random/mersenne_twister.hpp>
-#include <boost/random/uniform_int_distribution.hpp>
-#include <memory>
-#include <optional>
-#include <string>
+#include <boost/date_time.hpp>
+#include <boost/format.hpp>
+#include <boost/random.hpp>
+#include <set>
#include <unordered_map>
#include <unordered_set>
@@ -48,11 +46,11 @@ namespace GpgFrontend::Module {
class GlobalModuleContext::Impl {
public:
Impl(TaskRunnerPtr task_runner)
- : default_task_runner_(task_runner),
- random_gen_(
+ : random_gen_(
(boost::posix_time::microsec_clock::universal_time() -
boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1)))
- .total_milliseconds()) {
+ .total_milliseconds()),
+ default_task_runner_(task_runner) {
// Initialize acquired channels with default values.
acquired_channel_.insert(GPGFRONTEND_DEFAULT_CHANNEL);
acquired_channel_.insert(GPGFRONTEND_NON_ASCII_CHANNEL);
diff --git a/src/core/module/GlobalModuleContext.h b/src/core/module/GlobalModuleContext.h
index 82ce23c1..e48f186e 100644
--- a/src/core/module/GlobalModuleContext.h
+++ b/src/core/module/GlobalModuleContext.h
@@ -28,6 +28,8 @@
#pragma once
+#include <optional>
+
#include "core/module/Event.h"
#include "core/thread/TaskRunner.h"
#include "module/GlobalRegisterTable.h"
diff --git a/src/core/module/GlobalRegisterTable.h b/src/core/module/GlobalRegisterTable.h
index 787f93b8..f900559e 100644
--- a/src/core/module/GlobalRegisterTable.h
+++ b/src/core/module/GlobalRegisterTable.h
@@ -28,6 +28,9 @@
#pragma once
+#include <any>
+#include <optional>
+
#include "core/GpgFrontendCore.h"
namespace GpgFrontend::Module {
diff --git a/src/core/module/Module.cpp b/src/core/module/Module.cpp
index 71a91cb8..d66773ff 100644
--- a/src/core/module/Module.cpp
+++ b/src/core/module/Module.cpp
@@ -28,7 +28,7 @@
#include "Module.h"
-#include <memory>
+#include <boost/format.hpp>
#include "core/module/GlobalModuleContext.h"