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
This commit is contained in:
gavinandresen
2010-12-03 19:38:09 +00:00
parent bfd471f53e
commit bdde31d787
7 changed files with 33 additions and 31 deletions

11
util.h
View File

@@ -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)