17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 20:19:20 +02:00

refactor(sonar): make narrowing conversions explicit (cpp:S5276)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 15:16:28 +02:00
parent 80464d0bc1
commit 8c23c1fe2b
53 changed files with 468 additions and 468 deletions

View File

@@ -75,13 +75,13 @@ light_array::update() {
light.intensity = std::max(0.0f, std::log((float)light.count + 1.0f));
if (light.owner->DimHeadlights && !light.owner->HighBeamLights && isEnabled) // tylko przyciemnione
light.intensity *= light.owner->MoverParameters->dimMultiplier;
light.intensity *= static_cast<float>(light.owner->MoverParameters->dimMultiplier);
else if (!light.owner->DimHeadlights && !light.owner->HighBeamLights && isEnabled) // normalne
light.intensity *= light.owner->MoverParameters->normMultiplier;
light.intensity *= static_cast<float>(light.owner->MoverParameters->normMultiplier);
else if (light.owner->DimHeadlights && light.owner->HighBeamLights && isEnabled) // przyciemnione dlugie
light.intensity *= light.owner->MoverParameters->highDimMultiplier;
light.intensity *= static_cast<float>(light.owner->MoverParameters->highDimMultiplier);
else if (!light.owner->DimHeadlights && light.owner->HighBeamLights && isEnabled) // dlugie zwykle
light.intensity *= light.owner->MoverParameters->highMultiplier;
light.intensity *= static_cast<float>(light.owner->MoverParameters->highMultiplier);
else if (!isEnabled)
{
light.intensity = 0.0f;