17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-05 00:45:42 +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

@@ -3241,7 +3241,7 @@ double TFV4aM::GetRP()
/// <returns>Interpolated target pressure [bar].</returns>
double TFV4aM::LPP_RP(double pos) // cisnienie z zaokraglonej pozycji;
{
int const i_pos = 2 + std::floor(pos); // zaokraglone w dol
int const i_pos = static_cast<int>(2 + std::floor(pos)); // zaokraglone w dol
return BPT[i_pos][1] + (BPT[i_pos + 1][1] - BPT[i_pos][1]) * (pos + 2 - i_pos); // interpolacja liniowa
}
@@ -3844,7 +3844,7 @@ double TM394::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
double ActFlowSpeed;
int BCP;
BCP = lround(i_bcp);
BCP = static_cast<int>(lround(i_bcp));
if (BCP < -1)
BCP = 1;
@@ -3937,7 +3937,7 @@ double TH14K1::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
//{ (10, 0), (4, 1), (0, 1), (4, 0), (4, -1), (15, -1) };
double const NomPress = 5.0;
int BCP = std::lround(i_bcp);
int BCP = static_cast<int>(std::lround(i_bcp));
if (i_bcp < -1)
{
BCP = 1;
@@ -4034,7 +4034,7 @@ double TSt113::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
CP = PP;
BCP = lround(i_bcp);
BCP = static_cast<int>(lround(i_bcp));
EPS = BEP_K[BCP + 1];