aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-16 12:26:01 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-16 12:26:09 -0400
commitfaf989f93695d29099f6e152d5a2e117cd304183 (patch)
treeb7b882536225539faabbeaaca1c241f63e9a2c2c /src/util
parentfae00a77e2589cc784650e3e60e1b99c22ca8a7b (diff)
util: Document why ArgsManager (con/de)structor is not inline
Diffstat (limited to 'src/util')
-rw-r--r--src/util/settings.h2
-rw-r--r--src/util/system.cpp9
-rw-r--r--src/util/system.h1
3 files changed, 7 insertions, 5 deletions
diff --git a/src/util/settings.h b/src/util/settings.h
index bbb6abe2c0..1d03639fa2 100644
--- a/src/util/settings.h
+++ b/src/util/settings.h
@@ -9,7 +9,7 @@
#include <string>
#include <vector>
-#include <univalue.h> // For util::SettingsValue = UniValue
+class UniValue;
namespace util {
diff --git a/src/util/system.cpp b/src/util/system.cpp
index b0a538b527..69a7be96dc 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -226,10 +226,11 @@ static bool CheckValid(const std::string& key, const util::SettingsValue& val, u
return true;
}
-ArgsManager::ArgsManager()
-{
- // nothing to do
-}
+// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
+// #include class definitions for all members.
+// For example, m_settings has an internal dependency on univalue.
+ArgsManager::ArgsManager() {}
+ArgsManager::~ArgsManager() {}
const std::set<std::string> ArgsManager::GetUnsuitableSectionOnlyArgs() const
{
diff --git a/src/util/system.h b/src/util/system.h
index 3138522b5c..96f51e6074 100644
--- a/src/util/system.h
+++ b/src/util/system.h
@@ -192,6 +192,7 @@ protected:
public:
ArgsManager();
+ ~ArgsManager();
/**
* Select the network in use