Skip to content

Commit fcbde90

Browse files
Marko Bencunlaanwj
authored andcommitted
remove unused gArgs wrappers
1 parent bb81e17 commit fcbde90

File tree

2 files changed

+3
-49
lines changed

2 files changed

+3
-49
lines changed

src/util.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@ const fs::path &GetDataDir(bool fNetSpecific)
564564
if (!path.empty())
565565
return path;
566566

567-
if (IsArgSet("-datadir")) {
568-
path = fs::system_complete(GetArg("-datadir", ""));
567+
if (gArgs.IsArgSet("-datadir")) {
568+
path = fs::system_complete(gArgs.GetArg("-datadir", ""));
569569
if (!fs::is_directory(path)) {
570570
path = "";
571571
return path;
@@ -627,7 +627,7 @@ void ArgsManager::ReadConfigFile(const std::string& confPath)
627627
#ifndef WIN32
628628
fs::path GetPidFile()
629629
{
630-
fs::path pathPidFile(GetArg("-pid", BITCOIN_PID_FILENAME));
630+
fs::path pathPidFile(gArgs.GetArg("-pid", BITCOIN_PID_FILENAME));
631631
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
632632
return pathPidFile;
633633
}

src/util.h

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -263,52 +263,6 @@ class ArgsManager
263263

264264
extern ArgsManager gArgs;
265265

266-
// wrappers using the global ArgsManager:
267-
static inline void ParseParameters(int argc, const char*const argv[])
268-
{
269-
gArgs.ParseParameters(argc, argv);
270-
}
271-
272-
static inline void ReadConfigFile(const std::string& confPath)
273-
{
274-
gArgs.ReadConfigFile(confPath);
275-
}
276-
277-
static inline bool SoftSetArg(const std::string& strArg, const std::string& strValue)
278-
{
279-
return gArgs.SoftSetArg(strArg, strValue);
280-
}
281-
282-
static inline void ForceSetArg(const std::string& strArg, const std::string& strValue)
283-
{
284-
gArgs.ForceSetArg(strArg, strValue);
285-
}
286-
287-
static inline bool IsArgSet(const std::string& strArg)
288-
{
289-
return gArgs.IsArgSet(strArg);
290-
}
291-
292-
static inline std::string GetArg(const std::string& strArg, const std::string& strDefault)
293-
{
294-
return gArgs.GetArg(strArg, strDefault);
295-
}
296-
297-
static inline int64_t GetArg(const std::string& strArg, int64_t nDefault)
298-
{
299-
return gArgs.GetArg(strArg, nDefault);
300-
}
301-
302-
static inline bool GetBoolArg(const std::string& strArg, bool fDefault)
303-
{
304-
return gArgs.GetBoolArg(strArg, fDefault);
305-
}
306-
307-
static inline bool SoftSetBoolArg(const std::string& strArg, bool fValue)
308-
{
309-
return gArgs.SoftSetBoolArg(strArg, fValue);
310-
}
311-
312266
/**
313267
* Format a string to be used as group of options in help messages
314268
*

0 commit comments

Comments
 (0)