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

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

This commit is contained in:
jerrrrycho
2026-10-10 15:16:28 +02:00
parent d325a54756
commit ad32f1f840
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;