aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/util.h b/util.h
index 31ba4f5224..f57e401067 100644
--- a/util.h
+++ b/util.h
@@ -417,6 +417,17 @@ inline int64 GetArg(const string& strArg, int64 nDefault)
return nDefault;
}
+inline bool GetBoolArg(const string& strArg)
+{
+ if (mapArgs.count(strArg))
+ {
+ if (mapArgs[strArg].empty())
+ return true;
+ return (atoi(mapArgs[strArg]) != 0);
+ }
+ return false;
+}
+
inline string FormatVersion(int nVersion)
{
if (nVersion%100 == 0)