From e82fe8cdc194f142a59f401b7ff8bf59997cfdb7 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:02:50 +0100 Subject: [PATCH] Fixed cppcheck errors --- src/console_commands.h | 4 ++-- src/p2p_server.h | 4 ++-- src/p2pool.h | 2 +- src/pow_hash.h | 4 ++-- src/stratum_server.h | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/console_commands.h b/src/console_commands.h index b45b113..e6d570e 100644 --- a/src/console_commands.h +++ b/src/console_commands.h @@ -28,12 +28,12 @@ class ConsoleCommands : public TCPServer { public: explicit ConsoleCommands(p2pool* pool); - ~ConsoleCommands(); + ~ConsoleCommands() override; struct ConsoleClient : public Client { ConsoleClient() : Client(m_consoleReadBuf, sizeof(m_consoleReadBuf)) {} - ~ConsoleClient() {} + ~ConsoleClient() override {} static Client* allocate() { return new ConsoleClient(); } diff --git a/src/p2p_server.h b/src/p2p_server.h index 0ded81a..185dac3 100644 --- a/src/p2p_server.h +++ b/src/p2p_server.h @@ -59,7 +59,7 @@ public: }; explicit P2PServer(p2pool *pool); - ~P2PServer(); + ~P2PServer() override; void add_cached_block(const PoolBlock& block); void clear_cached_blocks(); @@ -72,7 +72,7 @@ public: struct P2PClient : public Client { P2PClient(); - ~P2PClient(); + ~P2PClient() override; static Client* allocate() { return new P2PClient(); } virtual size_t size() const override { return sizeof(P2PClient); } diff --git a/src/p2pool.h b/src/p2pool.h index e24d28a..ceb50c9 100644 --- a/src/p2pool.h +++ b/src/p2pool.h @@ -39,7 +39,7 @@ class p2pool : public MinerCallbackHandler, public nocopy_nomove { public: p2pool(int argc, char* argv[]); - ~p2pool(); + ~p2pool() override; int run(); diff --git a/src/pow_hash.h b/src/pow_hash.h index 68a49b1..64977d8 100644 --- a/src/pow_hash.h +++ b/src/pow_hash.h @@ -48,7 +48,7 @@ class RandomX_Hasher : public RandomX_Hasher_Base { public: explicit RandomX_Hasher(p2pool* pool); - ~RandomX_Hasher(); + ~RandomX_Hasher() override; void set_seed_async(const hash& seed) override; void set_seed(const hash& seed); @@ -98,7 +98,7 @@ class RandomX_Hasher_RPC : public RandomX_Hasher_Base { public: explicit RandomX_Hasher_RPC(p2pool* pool); - ~RandomX_Hasher_RPC(); + ~RandomX_Hasher_RPC() override; bool calculate(const void* data_ptr, size_t size, uint64_t height, const hash& seed, hash& h, bool force_light_mode) override; diff --git a/src/stratum_server.h b/src/stratum_server.h index 800dedb..483d547 100644 --- a/src/stratum_server.h +++ b/src/stratum_server.h @@ -32,14 +32,14 @@ class StratumServer : public TCPServer { public: explicit StratumServer(p2pool *pool); - ~StratumServer(); + ~StratumServer() override; void on_block(const BlockTemplate& block); struct StratumClient : public Client { StratumClient(); - FORCEINLINE ~StratumClient() {} + FORCEINLINE ~StratumClient() override {} static Client* allocate() { return new StratumClient(); } virtual size_t size() const override { return sizeof(StratumClient); }