17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 10:19:20 +02: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().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 17:28:41 +02:00
parent ec8a333753
commit adfad8016e
11 changed files with 14 additions and 14 deletions

View File

@@ -105,7 +105,7 @@ bool TTrainParameters::UpdateMTable( scenario_time const &Time, std::string cons
return UpdateMTable( Time.data().wHour, Time.data().wMinute + Time.data().wSecond * 0.0167, NewName );
}
bool TTrainParameters::UpdateMTable(double hh, double mm, std::string const &NewName)
bool TTrainParameters::UpdateMTable(double hh, double mm, std::string_view NewName)
/*odfajkowanie dojechania do stacji (NewName) i przeliczenie opóźnienia*/
{
bool OK;
@@ -205,7 +205,7 @@ TTrainParameters::TTrainParameters(std::string const &NewTrainName)
NewName(NewTrainName);
}
void TTrainParameters::NewName(std::string const &NewTrainName)
void TTrainParameters::NewName(std::string_view NewTrainName)
/*wstępne ustawienie parametrów rozkładu jazdy*/
{
TrainName = NewTrainName;