Added GetArgUInt function
[novacoin.git] / src / util.cpp
index f540500..8f896d7 100644 (file)
@@ -595,6 +595,13 @@ int32_t GetArgInt(const std::string& strArg, int32_t nDefault)
     return nDefault;
 }
 
+uint32_t GetArgUInt(const std::string& strArg, uint32_t nDefault)
+{
+    if (mapArgs.count(strArg))
+        return strtoul(mapArgs[strArg]);
+    return nDefault;
+}
+
 bool GetBoolArg(const std::string& strArg, bool fDefault)
 {
     if (mapArgs.count(strArg))