From 28396d9d8050b52490a5edd1e263223237275af0 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 20 Mar 2022 17:55:15 +0000 Subject: [PATCH] Removed unused EventManager class member from DebugServer and derived classes --- src/Application.hpp | 1 - src/DebugServers/DebugServer.hpp | 11 +++-------- src/DebugServers/GdbRsp/AvrGdbRsp/AvrGdbRsp.hpp | 3 +-- src/DebugServers/GdbRsp/GdbRspDebugServer.hpp | 3 +-- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/Application.hpp b/src/Application.hpp index e4f2c42a..996e7c10 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -51,7 +51,6 @@ namespace Bloom "avr-gdb-rsp", [this] () -> std::unique_ptr { return std::make_unique( - this->eventManager, this->projectConfig.value(), this->environmentConfig.value(), this->debugServerConfig.value() diff --git a/src/DebugServers/DebugServer.hpp b/src/DebugServers/DebugServer.hpp index 9118dfa0..b546c9fa 100644 --- a/src/DebugServers/DebugServer.hpp +++ b/src/DebugServers/DebugServer.hpp @@ -29,15 +29,14 @@ namespace Bloom::DebugServers { public: explicit DebugServer( - EventManager& eventManager, const ProjectConfig& projectConfig, const EnvironmentConfig& environmentConfig, const DebugServerConfig& debugServerConfig ) - : eventManager(eventManager) - , projectConfig(projectConfig) + : projectConfig(projectConfig) , environmentConfig(environmentConfig) - , debugServerConfig(debugServerConfig) {}; + , debugServerConfig(debugServerConfig) + {}; /** * Entry point for the DebugServer. This must called from a dedicated thread. @@ -47,10 +46,6 @@ namespace Bloom::DebugServers virtual std::string getName() const = 0; protected: - /** - * Application-wide instance to EventManager - */ - EventManager& eventManager; EventListenerPointer eventListener = std::make_shared("DebugServerEventListener"); ProjectConfig projectConfig; diff --git a/src/DebugServers/GdbRsp/AvrGdbRsp/AvrGdbRsp.hpp b/src/DebugServers/GdbRsp/AvrGdbRsp/AvrGdbRsp.hpp index 77b7a54e..5a1e686a 100644 --- a/src/DebugServers/GdbRsp/AvrGdbRsp/AvrGdbRsp.hpp +++ b/src/DebugServers/GdbRsp/AvrGdbRsp/AvrGdbRsp.hpp @@ -27,11 +27,10 @@ namespace Bloom::DebugServers::Gdb { public: explicit AvrGdbRsp( - EventManager& eventManager, const ProjectConfig& projectConfig, const EnvironmentConfig& environmentConfig, const DebugServerConfig& debugServerConfig - ): GdbRspDebugServer(eventManager, projectConfig, environmentConfig, debugServerConfig) {}; + ): GdbRspDebugServer(projectConfig, environmentConfig, debugServerConfig) {}; std::string getName() const override { return "AVR GDB Remote Serial Protocol Debug Server"; diff --git a/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp b/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp index 7b94d870..a8222b01 100644 --- a/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp +++ b/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp @@ -42,11 +42,10 @@ namespace Bloom::DebugServers::Gdb { public: explicit GdbRspDebugServer( - EventManager& eventManager, const ProjectConfig& projectConfig, const EnvironmentConfig& environmentConfig, const DebugServerConfig& debugServerConfig - ): DebugServer(eventManager, projectConfig, environmentConfig, debugServerConfig) {}; + ): DebugServer(projectConfig, environmentConfig, debugServerConfig) {}; std::string getName() const override { return "GDB Remote Serial Protocol DebugServer";