X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.cpp;h=f540500a3510c06238d24d00e8983014ca86648d;hb=fe326c477b0b109819653dc2657495f867ff8616;hp=d434c815ea00ff6bbc57e19a7138ab1fe2126adc;hpb=1d8129375a4d646abb5c49075d2b1f065d932680;p=novacoin.git diff --git a/src/util.cpp b/src/util.cpp index d434c81..f540500 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -588,6 +588,13 @@ int64_t GetArg(const std::string& strArg, int64_t nDefault) return nDefault; } +int32_t GetArgInt(const std::string& strArg, int32_t nDefault) +{ + if (mapArgs.count(strArg)) + return strtol(mapArgs[strArg]); + return nDefault; +} + bool GetBoolArg(const std::string& strArg, bool fDefault) { if (mapArgs.count(strArg)) @@ -1272,7 +1279,7 @@ void ShrinkDebugFile() // Restart the file with some of the end char pch[200000]; fseek(file, -((long long)sizeof(pch)), SEEK_END); - int nBytes = fread(pch, 1, sizeof(pch), file); + size_t nBytes = fread(pch, 1, sizeof(pch), file); fclose(file); file = fopen(pathLog.string().c_str(), "w");