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

refactor(sonar): use auto where the type is spelled out on the right (cpp:S5827)

This commit is contained in:
jerrrrycho
2026-10-10 15:52:25 +02:00
parent f8c6e358bd
commit 413009e59e
19 changed files with 39 additions and 39 deletions

View File

@@ -197,7 +197,7 @@ void sn_utils::ls_int64(std::ostream &s, int64_t v)
void sn_utils::ls_float32(std::ostream &s, float t)
{
uint32_t v = std::bit_cast<uint32_t>(t);
auto v = std::bit_cast<uint32_t>(t);
uint8_t buf[4];
buf[0] = static_cast<uint8_t>(v);
buf[1] = static_cast<uint8_t>(v >> 8);
@@ -208,7 +208,7 @@ void sn_utils::ls_float32(std::ostream &s, float t)
void sn_utils::ls_float64(std::ostream &s, double t)
{
uint64_t v = std::bit_cast<uint64_t>(t);
auto v = std::bit_cast<uint64_t>(t);
uint8_t buf[8];
buf[0] = static_cast<uint8_t>(v);
buf[1] = static_cast<uint8_t>(v >> 8);