mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 15:34:58 +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(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2518,7 +2518,7 @@ class TMoverParameters
|
||||
|
||||
/* funckje dla wagonow*/
|
||||
bool AssignLoad(std::string const &Name, float const Amount = 0.f);
|
||||
bool LoadingDone(double LSpeed, std::string const &Loadname);
|
||||
bool LoadingDone(double LSpeed, std::string_view Loadname);
|
||||
bool PermitDoors(side const Door, bool const State = true, range_t const Notify = range_t::consist);
|
||||
void PermitDoors_(side const Door, bool const State = true);
|
||||
bool ChangeDoorPermitPreset(int const Change, range_t const Notify = range_t::consist);
|
||||
|
||||
@@ -8454,7 +8454,7 @@ bool TMoverParameters::AssignLoad(std::string const &Loadname, float const Amoun
|
||||
// Q: 20160713
|
||||
// Test zakończenia załadunku / rozładunku
|
||||
// *************************************************************************************************
|
||||
bool TMoverParameters::LoadingDone(double const LSpeed, std::string const &Loadname)
|
||||
bool TMoverParameters::LoadingDone(double const LSpeed, std::string_view Loadname)
|
||||
{
|
||||
|
||||
if (LSpeed == 0.0)
|
||||
@@ -9005,7 +9005,7 @@ bool startLIGHTSLIST;
|
||||
bool startCOMPRESSORLIST;
|
||||
int LISTLINE;
|
||||
|
||||
bool issection(std::string const &Name, std::string const &Input)
|
||||
bool issection(std::string_view Name, std::string_view Input)
|
||||
{
|
||||
|
||||
return Input.compare(0, Name.size(), Name) == 0;
|
||||
|
||||
Reference in New Issue
Block a user