aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-01-03 12:19:48 -0500
committerLuke Dashjr <luke-jr+git@utopios.org>2012-01-03 12:19:48 -0500
commiteb2a10afd600b2680f24d02ffc73d4c9d9800492 (patch)
tree90538703868e2b1c04c76c41b7368f2d04d4add8 /src/util.cpp
parent3b8051864b98eb5a9df6327f314a45af9205a09c (diff)
parentcc6bd19660461091903568803014b39d571fd458 (diff)
downloadbitcoin-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.cpp17
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+/";