From fdaa7b51b949a929ca6435b8b1a6b4d822a146d9 Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Sun, 22 Aug 2021 22:30:09 +0100 Subject: [PATCH] Move Turnout code from .h to .cpp. Move implementation of Turnout::printState from Turnouts.h to Turnouts.cpp. No functional changes. --- Turnouts.cpp | 5 +++++ Turnouts.h | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Turnouts.cpp b/Turnouts.cpp index aa183cc..7b87153 100644 --- a/Turnouts.cpp +++ b/Turnouts.cpp @@ -74,6 +74,11 @@ turnoutlistHash++; } + void Turnout::printState(Print *stream) { + StringFormatter::send(stream, F("\n"), + _turnoutData.id, _turnoutData.closed ^ useLegacyTurnoutBehaviour); + } + // Remove nominated turnout from turnout linked list and delete the object. bool Turnout::remove(uint16_t id) { Turnout *tt,*pp=NULL; diff --git a/Turnouts.h b/Turnouts.h index 2d1b9e8..45f60a6 100644 --- a/Turnouts.h +++ b/Turnouts.h @@ -114,10 +114,7 @@ public: inline bool isType(uint8_t type) { return _turnoutData.turnoutType == type; } inline uint16_t getId() { return _turnoutData.id; } inline Turnout *next() { return _nextTurnout; } - inline void printState(Print *stream) { - StringFormatter::send(stream, F("\n"), - _turnoutData.id, _turnoutData.closed ^ useLegacyTurnoutBehaviour); - } + void printState(Print *stream); /* * Virtual functions */