diff --git a/src/TargetController/TargetControllerComponent.hpp b/src/TargetController/TargetControllerComponent.hpp index 1becd9cb..5b043eca 100644 --- a/src/TargetController/TargetControllerComponent.hpp +++ b/src/TargetController/TargetControllerComponent.hpp @@ -16,6 +16,8 @@ #include "src/Helpers/SyncSafe.hpp" #include "src/Helpers/ConditionVariableNotifier.hpp" +#include "TargetControllerState.hpp" + // Commands #include "Commands/Command.hpp" #include "Commands/GetTargetDescriptor.hpp" @@ -46,8 +48,6 @@ #include "Responses/TargetStackPointer.hpp" #include "Responses/TargetProgramCounter.hpp" -#include "TargetControllerState.hpp" - #include "src/DebugToolDrivers/DebugTools.hpp" #include "src/Targets/Target.hpp" #include "src/Targets/Targets.hpp" @@ -161,8 +161,8 @@ namespace Bloom::TargetController template void registerCommandHandler(std::function(CommandType&)> callback) { auto parentCallback = [callback] (Commands::Command& command) { - // Downcast the command to the expected type - return callback(dynamic_cast(command)); + // Downcast the command to the expected type + return callback(dynamic_cast(command)); }; this->commandHandlersByCommandType.insert(std::pair(CommandType::type, parentCallback)); @@ -320,6 +320,7 @@ namespace Bloom::TargetController */ void onDebugSessionFinishedEvent(const Events::DebugSessionFinished& event); + // Command handlers std::unique_ptr handleGetTargetDescriptor(Commands::GetTargetDescriptor& command); std::unique_ptr handleGetTargetState(Commands::GetTargetState& command); std::unique_ptr handleStopTargetExecution(Commands::StopTargetExecution& command);