mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 07:59:18 +02:00
reformat: remove redundant 'else' keyword
This commit is contained in:
@@ -169,15 +169,19 @@ bool TTrainParameters::IsTimeToGo(double hh, double mm)
|
||||
{
|
||||
if (StationIndex < 1)
|
||||
return true; // przed pierwszą jechać
|
||||
else if (StationIndex < StationCount)
|
||||
{ // oprócz ostatniego przystanku
|
||||
if (TimeTable[StationIndex].Ah < 0) // odjazd z poprzedniego
|
||||
return true; // czas przyjazdu nie był podany - przelot
|
||||
else
|
||||
return CompareTime(hh, mm, TimeTable[StationIndex].Dh, TimeTable[StationIndex].Dm) <= 0;
|
||||
}
|
||||
else // gdy rozkład się skończył
|
||||
return false; // dalej nie jechać
|
||||
else
|
||||
{
|
||||
if (StationIndex < StationCount)
|
||||
{ // oprócz ostatniego przystanku
|
||||
if (TimeTable[StationIndex].Ah < 0) // odjazd z poprzedniego
|
||||
return true; // czas przyjazdu nie był podany - przelot
|
||||
else
|
||||
return CompareTime(hh, mm, TimeTable[StationIndex].Dh, TimeTable[StationIndex].Dm) <= 0;
|
||||
}
|
||||
// gdy rozkład się skończył
|
||||
return false;
|
||||
}
|
||||
// dalej nie jechać
|
||||
}
|
||||
|
||||
// returns: difference between specified time and scheduled departure from current stop, in seconds
|
||||
|
||||
Reference in New Issue
Block a user