From 3134a4b4f3ae763540703d05c2ab5188e7b59e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 1 Feb 2021 12:58:09 -0300 Subject: [PATCH] StateMachine: Add missing const in member functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/Vehicle/StateMachine.cc | 2 +- src/Vehicle/StateMachine.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Vehicle/StateMachine.cc b/src/Vehicle/StateMachine.cc index 2cbc7df..727e4bc 100644 --- a/src/Vehicle/StateMachine.cc +++ b/src/Vehicle/StateMachine.cc @@ -51,7 +51,7 @@ void StateMachine::statesCompleted(void) const } -StateMachine::StateFn StateMachine::currentState(void) +StateMachine::StateFn StateMachine::currentState(void) const { if (_active) { return rgStates()[_stateIndex]; diff --git a/src/Vehicle/StateMachine.h b/src/Vehicle/StateMachine.h index 7710574..fea11da 100644 --- a/src/Vehicle/StateMachine.h +++ b/src/Vehicle/StateMachine.h @@ -29,7 +29,7 @@ public: /// Move the state machine to the specified state and call the state function void move(StateFn stateFn); - StateFn currentState(void); + StateFn currentState(void) const; /// @return The number of states in the rgStates array virtual int stateCount(void) const = 0;