diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-01-03 12:19:48 -0500 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-01-03 12:19:48 -0500 |
commit | eb2a10afd600b2680f24d02ffc73d4c9d9800492 (patch) | |
tree | 90538703868e2b1c04c76c41b7368f2d04d4add8 /src/util.cpp | |
parent | 3b8051864b98eb5a9df6327f314a45af9205a09c (diff) | |
parent | cc6bd19660461091903568803014b39d571fd458 (diff) | |
download | bitcoin-eb2a10afd600b2680f24d02ffc73d4c9d9800492.tar.xz |
Merge branch '0.4.x' into 0.5.0.x
Conflicts:
src/util.cpp
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 236c7f7c44..3472111bb1 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -469,6 +469,23 @@ void ParseParameters(int argc, char* argv[]) } } +bool SoftSetArg(const std::string& strArg, const std::string& strValue) +{ + if (mapArgs.count(strArg)) + return false; + mapArgs[strArg] = strValue; + return true; +} + +bool SoftSetArg(const std::string& strArg, bool fValue) +{ + if (fValue) + return SoftSetArg(strArg, std::string("1")); + else + return SoftSetArg(strArg, std::string("0")); +} + + string EncodeBase64(const unsigned char* pch, size_t len) { static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |