Skip to content

Commit faf989f

Browse files
author
MarcoFalke
committed
util: Document why ArgsManager (con/de)structor is not inline
1 parent fae00a7 commit faf989f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/util/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <string>
1010
#include <vector>
1111

12-
#include <univalue.h> // For util::SettingsValue = UniValue
12+
class UniValue;
1313

1414
namespace util {
1515

src/util/system.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,11 @@ static bool CheckValid(const std::string& key, const util::SettingsValue& val, u
226226
return true;
227227
}
228228

229-
ArgsManager::ArgsManager()
230-
{
231-
// nothing to do
232-
}
229+
// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
230+
// #include class definitions for all members.
231+
// For example, m_settings has an internal dependency on univalue.
232+
ArgsManager::ArgsManager() {}
233+
ArgsManager::~ArgsManager() {}
233234

234235
const std::set<std::string> ArgsManager::GetUnsuitableSectionOnlyArgs() const
235236
{

src/util/system.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ class ArgsManager
192192

193193
public:
194194
ArgsManager();
195+
~ArgsManager();
195196

196197
/**
197198
* Select the network in use

0 commit comments

Comments
 (0)