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

refactor(sonar): more small fixes

- std::format instead of iostream manipulators in to_string/to_hex_str (cpp:S6495);
  output verified identical, negative hex values keep the unsigned form
- remove an empty compound statement (cpp:S108)
- drop an always-false unsigned < 0 branch (cpp:S1768)
- explicit lambda capture (cpp:S3608)
- std::make_unique (cpp:S5950)
This commit is contained in:
jerrrrycho
2026-10-10 17:52:59 +02:00
parent ba6840b6ba
commit 780ddf9ddb
5 changed files with 7 additions and 14 deletions

View File

@@ -167,7 +167,7 @@ scenario_time::daymonth( WORD &Day, WORD &Month, WORD const Year, WORD const Yea
int
scenario_time::julian_day() const {
int yy = static_cast<int>(( m_time.wYear < 0 ? m_time.wYear + 1 : m_time.wYear ) - std::floor( ( 12 - m_time.wMonth ) / 10.f ));
int yy = static_cast<int>( m_time.wYear - std::floor( ( 12 - m_time.wMonth ) / 10.f ));
int mm = m_time.wMonth + 9;
if( mm >= 12 ) { mm -= 12; }