diff --git a/src/httprpc.cpp b/src/httprpc.cpp --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -33,7 +33,7 @@ */ class HTTPRPCTimer : public RPCTimerBase { public: - HTTPRPCTimer(struct event_base *eventBase, std::function &func, + HTTPRPCTimer(struct event_base *eventBase, std::function &func, int64_t millis) : ev(eventBase, false, func) { struct timeval tv; @@ -52,7 +52,7 @@ const char *Name() override { return "HTTP"; } - RPCTimerBase *NewTimer(std::function &func, + RPCTimerBase *NewTimer(std::function &func, int64_t millis) override { return new HTTPRPCTimer(base, func, millis); } diff --git a/src/httpserver.h b/src/httpserver.h --- a/src/httpserver.h +++ b/src/httpserver.h @@ -140,7 +140,7 @@ * handler is the handler to call when the event is triggered. */ HTTPEvent(struct event_base *base, bool deleteWhenTriggered, - const std::function &handler); + const std::function &handler); ~HTTPEvent(); /** @@ -150,7 +150,7 @@ void trigger(struct timeval *tv); bool deleteWhenTriggered; - std::function handler; + std::function handler; private: struct event *ev; diff --git a/src/httpserver.cpp b/src/httpserver.cpp --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -513,7 +513,7 @@ } HTTPEvent::HTTPEvent(struct event_base *base, bool _deleteWhenTriggered, - const std::function &_handler) + const std::function &_handler) : deleteWhenTriggered(_deleteWhenTriggered), handler(_handler) { ev = event_new(base, -1, 0, httpevent_callback_fn, this); assert(ev); diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -1196,7 +1196,7 @@ * Ensure that Bitcoin is running in a usable environment with all * necessary library support. */ -static bool InitSanityCheck(void) { +static bool InitSanityCheck() { if (!ECC_InitSanityCheck()) { InitError( "Elliptic curve cryptography sanity check failure. Aborting."); diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -656,7 +656,7 @@ // http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType) // IMPORTANT if it is no longer a typedef use the normal variant above qRegisterMetaType("Amount"); - qRegisterMetaType>("std::function"); + qRegisterMetaType>("std::function"); // Need to register any types Qt doesn't know about if you intend // to use them with the signal/slot mechanism Qt provides. Even pointers. diff --git a/src/qt/macnotificationhandler.h b/src/qt/macnotificationhandler.h --- a/src/qt/macnotificationhandler.h +++ b/src/qt/macnotificationhandler.h @@ -18,7 +18,7 @@ void showNotification(const QString &title, const QString &text); /** check if OS can handle UserNotifications */ - bool hasUserNotificationCenterSupport(void); + bool hasUserNotificationCenterSupport(); static MacNotificationHandler *instance(); }; diff --git a/src/qt/macnotificationhandler.mm b/src/qt/macnotificationhandler.mm --- a/src/qt/macnotificationhandler.mm +++ b/src/qt/macnotificationhandler.mm @@ -47,7 +47,7 @@ } } -bool MacNotificationHandler::hasUserNotificationCenterSupport(void) +bool MacNotificationHandler::hasUserNotificationCenterSupport() { Class possibleClass = NSClassFromString(@"NSUserNotificationCenter"); diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -97,8 +97,7 @@ class QtRPCTimerBase : public QObject, public RPCTimerBase { Q_OBJECT public: - QtRPCTimerBase(std::function &_func, int64_t millis) - : func(_func) { + QtRPCTimerBase(std::function &_func, int64_t millis) : func(_func) { timer.setSingleShot(true); connect(&timer, SIGNAL(timeout()), this, SLOT(timeout())); timer.start(millis); @@ -109,14 +108,14 @@ private: QTimer timer; - std::function func; + std::function func; }; class QtRPCTimerInterface : public RPCTimerInterface { public: ~QtRPCTimerInterface() {} const char *Name() override { return "Qt"; } - RPCTimerBase *NewTimer(std::function &func, + RPCTimerBase *NewTimer(std::function &func, int64_t millis) override { return new QtRPCTimerBase(func, millis); } diff --git a/src/rpc/server.h b/src/rpc/server.h --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -146,7 +146,7 @@ * but only GUI RPC console, and to break the dependency of pcserver on * httprpc. */ - virtual RPCTimerBase *NewTimer(std::function &func, + virtual RPCTimerBase *NewTimer(std::function &func, int64_t millis) = 0; }; @@ -169,7 +169,7 @@ * Run func nSeconds from now. * Overrides previous timer (if any). */ -void RPCRunLater(const std::string &name, std::function func, +void RPCRunLater(const std::string &name, std::function func, int64_t nSeconds); typedef UniValue (*rpcfn_type)(Config &config, diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -577,7 +577,7 @@ } } -void RPCRunLater(const std::string &name, std::function func, +void RPCRunLater(const std::string &name, std::function func, int64_t nSeconds) { if (!timerInterface) { throw JSONRPCError(RPC_INTERNAL_ERROR, diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp --- a/src/test/crypto_tests.cpp +++ b/src/test/crypto_tests.cpp @@ -229,7 +229,7 @@ BOOST_CHECK(out == outres); } -static std::string LongTestString(void) { +static std::string LongTestString() { std::string ret; for (int i = 0; i < 200000; i++) { ret += uint8_t(i); diff --git a/src/ui_interface.h b/src/ui_interface.h --- a/src/ui_interface.h +++ b/src/ui_interface.h @@ -125,7 +125,7 @@ boost::signals2::signal NotifyHeaderTip; /** Banlist did change. */ - boost::signals2::signal BannedListChanged; + boost::signals2::signal BannedListChanged; }; /** Show warning message **/ diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5530,7 +5530,7 @@ return true; } -bool DumpMempool(void) { +bool DumpMempool() { int64_t start = GetTimeMicros(); std::map mapDeltas; diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -84,7 +84,7 @@ wtxn.emplace_back(std::move(wtx)); } -static void empty_wallet(void) { +static void empty_wallet() { vCoins.clear(); wtxn.clear(); balance = Amount::zero();