diff options
| author | Gavin Andresen <[email protected]> | 2012-01-03 10:14:22 -0500 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2012-01-03 11:48:44 -0500 |
| commit | 84393f15b60ff5392da69b7cc208ffb5e8d209f0 (patch) | |
| tree | d536b944eb7a466cfafb8f87e7f4bf6a4b5075f4 /src/util.cpp | |
| parent | Fix some address-handling deadlocks (diff) | |
| download | discoin-84393f15b60ff5392da69b7cc208ffb5e8d209f0.tar.xz discoin-84393f15b60ff5392da69b7cc208ffb5e8d209f0.zip | |
Fix issue #659, and cleanup wallet/command-line argument handling a bit
Conflicts:
src/init.cpp
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 d6a113095..a3f1c9507 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -472,6 +472,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")); +} + + const char* wxGetTranslation(const char* pszEnglish) { |