17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-06 17:28:36 +01:00

refactor(sonar): declare non-mutating member functions const (cpp:S5817)

Virtual functions are left untouched so overrides keep matching.
This commit is contained in:
jerrrrycho
2026-10-10 15:26:48 +02:00
parent 01d2b9bf82
commit 8042953b95
82 changed files with 221 additions and 221 deletions

View File

@@ -65,17 +65,17 @@ class TTrainParameters
std::string NextStationName;
double LastStationLatency;
int Direction; /*kierunek jazdy w/g kilometrazu*/
double CheckTrainLatency();
double CheckTrainLatency() const;
/*todo: str hh:mm to int i z powrotem*/
std::string ShowRelation() const;
double WatchMTable(double DistCounter);
double WatchMTable(double DistCounter) const;
std::string NextStop() const;
sound_source next_stop_sound() const;
sound_source last_stop_sound() const;
bool IsStop() const;
bool IsLastStop() const;
bool IsMaintenance() const;
bool IsTimeToGo(double hh, double mm);
bool IsTimeToGo(double hh, double mm) const;
// returns: difference between specified time and scheduled departure from current stop, in seconds
double seconds_until_departure( double const Hour, double const Minute ) const;
bool UpdateMTable(double hh, double mm, std::string const &NewName);
@@ -85,7 +85,7 @@ class TTrainParameters
void NewName(std::string const &NewTrainName);
void UpdateVelocity(int StationCount, double vActual);
bool LoadTTfile(std::string scnpath, int iPlus, double vmax);
bool DirectionChange();
bool DirectionChange() const;
void StationIndexInc();
void serialize( dictionary_source *Output ) const;
// returns: radio channel associated with current station, or -1