17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-28 13:27:30 +01: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

@@ -125,7 +125,7 @@ double TTractionPowerSource::CurrentGet(double res)
}
if (res > 0 || (res < 0 && (Recuperation || true)))
TotalAdmitance += 1.0 / res; // połączenie równoległe rezystancji jest równoważne sumie admitancji
float NomVolt = TotalPreviousAdmitance < 0 ? NominalVoltage * 1.083 : NominalVoltage;
float NomVolt = TotalPreviousAdmitance < 0 ? static_cast<float>(NominalVoltage * 1.083) : static_cast<float>(NominalVoltage);
TotalCurrent = TotalPreviousAdmitance != 0.0 ?
NomVolt / (InternalRes + 1.0 / TotalPreviousAdmitance) :
0.0; // napięcie dzielone przez sumę rezystancji wewnętrznej i obciążenia