mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 19:39:20 +02:00
refactor(sonar): make read-only local references and pointers const (cpp:S5350)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ ui::vehiclelist_panel::vehiclelist_panel(ui_layer &parent)
|
||||
void ui::vehiclelist_panel::render_contents()
|
||||
{
|
||||
if (m_first_show && Global.gui_trainingdefault) {
|
||||
for (TDynamicObject *vehicle : simulation::Vehicles.sequence())
|
||||
for (TDynamicObject const *vehicle : simulation::Vehicles.sequence())
|
||||
{
|
||||
if (!vehicle->Mechanik || vehicle->name() != ToLower(Global.local_start_vehicle))
|
||||
continue;
|
||||
@@ -26,7 +26,7 @@ void ui::vehiclelist_panel::render_contents()
|
||||
return;
|
||||
}
|
||||
|
||||
for (TDynamicObject *vehicle : simulation::Vehicles.sequence())
|
||||
for (TDynamicObject const *vehicle : simulation::Vehicles.sequence())
|
||||
{
|
||||
if (!vehicle->Mechanik)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user