17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-03 01:30:16 +01:00

refactor(sonar): take read-only string parameters as std::string_view (cpp:S6009)

The Windows messaging helpers keep std::string, they need c_str().
This commit is contained in:
jerrrrycho
2026-10-10 17:28:41 +02:00
parent 86c99c2421
commit 2afa42c6b7
11 changed files with 14 additions and 14 deletions

View File

@@ -78,11 +78,11 @@ class TTrainParameters
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);
bool UpdateMTable(double hh, double mm, std::string_view NewName);
bool UpdateMTable( scenario_time const &Time, std::string const &NewName );
bool RewindTimeTable( std::string actualStationName );
explicit TTrainParameters( std::string const &NewTrainName = "none" );
void NewName(std::string const &NewTrainName);
void NewName(std::string_view NewTrainName);
void UpdateVelocity(int StationCount, double vActual);
bool LoadTTfile(std::string const &scnpath, int iPlus, double vmax);
bool DirectionChange() const;