diff options
author | gavinandresen <gavinandresen@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-12-03 19:38:09 +0000 |
---|---|---|
committer | gavinandresen <gavinandresen@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-12-03 19:38:09 +0000 |
commit | bdde31d787c4fe2da8e9fb168abbd22af2c27442 (patch) | |
tree | 46005f6e32c45217699a84a4ed3b8a665359a0bb /util.h | |
parent | bfd471f53e14c4218ae7a1544beb7f1de3e695b2 (diff) |
All boolean options/flags now work the same way.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@194 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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) |