1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 18:03:45 +02:00

Change Stream refernces to pointers

I misunderstood that references can never be changed.
This commit is contained in:
Asbelos
2020-08-01 16:32:16 +01:00
parent a14b9ef8bf
commit 9044cce2a3
13 changed files with 123 additions and 97 deletions

View File

@@ -73,7 +73,7 @@ bool Turnout::remove(int n){
///////////////////////////////////////////////////////////////////////////////
void Turnout::show(Print & stream, int n){
void Turnout::show(Print * stream, int n){
for(Turnout *tt=firstTurnout;tt!=NULL;tt=tt->nextTurnout){
if (tt->data.id==n) {
StringFormatter::send(stream,F("<H %d %d>"), tt->data.id, tt->data.tStatus & STATUS_ACTIVE);
@@ -82,7 +82,7 @@ void Turnout::show(Print & stream, int n){
}
}
bool Turnout::showAll(Print & stream){
bool Turnout::showAll(Print * stream){
bool gotOne=false;
for(Turnout * tt=firstTurnout;tt!=NULL;tt=tt->nextTurnout){
StringFormatter::send(stream,F("<H %d %d %d %d>"), tt->data.id, tt->data.address, tt->data.subAddress, (tt->data.tStatus & STATUS_ACTIVE)!=0);