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

refactor(sonar): scope single-use variables in if init-statements (cpp:S6004)

This commit is contained in:
jerrrrycho
2026-10-10 15:44:18 +02:00
parent 0d886e65ec
commit 6fce71af36
27 changed files with 78 additions and 175 deletions

View File

@@ -54,8 +54,7 @@ void network::tcp::connection::handle_header(const asio::error_code &err, size_t
return;
}
uint32_t sig = sn_utils::ld_uint32(header);
if (sig != NETWORK_MAGIC) {
if (uint32_t sig = sn_utils::ld_uint32(header); sig != NETWORK_MAGIC) {
disconnect();
return;
}