From c7fcb6e2e9de7e214de22c400ca62d8dccf92cc7 Mon Sep 17 00:00:00 2001 From: Nav Date: Thu, 25 Jul 2024 19:04:39 +0100 Subject: [PATCH] Corrected return type of `getTargetState()` in TC service class --- src/Services/TargetControllerService.cpp | 2 +- src/Services/TargetControllerService.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/TargetControllerService.cpp b/src/Services/TargetControllerService.cpp index 6b613ce5..abd75505 100644 --- a/src/Services/TargetControllerService.cpp +++ b/src/Services/TargetControllerService.cpp @@ -115,7 +115,7 @@ namespace Services )->targetDescriptor; } - TargetState TargetControllerService::getTargetState() const { + const TargetState& TargetControllerService::getTargetState() const { return this->commandManager.sendCommandAndWaitForResponse( std::make_unique(), this->defaultTimeout, diff --git a/src/Services/TargetControllerService.hpp b/src/Services/TargetControllerService.hpp index ac11272b..b3996047 100644 --- a/src/Services/TargetControllerService.hpp +++ b/src/Services/TargetControllerService.hpp @@ -68,7 +68,7 @@ namespace Services * * @return */ - Targets::TargetState getTargetState() const; + const Targets::TargetState& getTargetState() const; /** * Requests the TargetController to halt execution on the target.