13
0

fix optimized unused variable warnings

This commit is contained in:
Paul Davis 2022-06-21 18:38:31 -06:00
parent 6fdd745dc5
commit ecefe29d5e

View File

@ -724,7 +724,9 @@ TransportFSM::defer (Event& ev)
void
TransportFSM::transition (MotionState ms)
{
#ifndef NDEBUG
const MotionState old = _motion_state;
#endif
_motion_state = ms;
_transport_speed = compute_transport_speed ();
DEBUG_TRACE (DEBUG::TFSMState, string_compose ("Leave %1, enter %2\n", enum_2_string (old), current_state()));
@ -733,7 +735,9 @@ TransportFSM::transition (MotionState ms)
void
TransportFSM::transition (ButlerState bs)
{
#ifndef NDEBUG
const ButlerState old = _butler_state;
#endif
_butler_state = bs;
_transport_speed = compute_transport_speed ();
DEBUG_TRACE (DEBUG::TFSMState, string_compose ("Leave %1, enter %2\n", enum_2_string (old), current_state()));
@ -742,7 +746,9 @@ TransportFSM::transition (ButlerState bs)
void
TransportFSM::transition (DirectionState ds)
{
#ifndef NDEBUG
const DirectionState old = _direction_state;
#endif
_direction_state = ds;
_transport_speed = compute_transport_speed ();
DEBUG_TRACE (DEBUG::TFSMState, string_compose ("Leave %1, enter %2\n", enum_2_string (old), current_state()));