mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 08:39:19 +02:00
refactor(sonar): rename locals that shadow outer declarations (cpp:S1117)
Only local variables and definition parameters are renamed; shadowing struct fields and enumerators in headers are left for a separate change.
This commit is contained in:
@@ -232,17 +232,17 @@ void network::client::send_commands(command_queue::commands_map commands) const
|
||||
conn->send_message(msg);
|
||||
}
|
||||
|
||||
void network::client::handle_message(std::shared_ptr<connection> conn, const message &msg)
|
||||
void network::client::handle_message(std::shared_ptr<connection> Connection, const message &msg)
|
||||
{
|
||||
if (msg.type >= message::TYPE_MAX)
|
||||
{
|
||||
conn->disconnect();
|
||||
Connection->disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.type == message::SERVER_HELLO) {
|
||||
const auto& cmd = dynamic_cast<const server_hello&>(msg);
|
||||
conn->state = connection::ACTIVE;
|
||||
Connection->state = connection::ACTIVE;
|
||||
|
||||
if (!Global.ready_to_load) {
|
||||
Global.random_seed = cmd.seed;
|
||||
@@ -253,14 +253,14 @@ void network::client::handle_message(std::shared_ptr<connection> conn, const mes
|
||||
Global.ready_to_load = true;
|
||||
} else if (Global.random_seed != cmd.seed) {
|
||||
ErrorLog("net: seed mismatch", logtype::net);
|
||||
conn->disconnect();
|
||||
Connection->disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
WriteLog("net: accept received", logtype::net);
|
||||
}
|
||||
|
||||
if (conn->state != connection::ACTIVE)
|
||||
if (Connection->state != connection::ACTIVE)
|
||||
return;
|
||||
|
||||
if (msg.type == message::FRAME_INFO) {
|
||||
|
||||
Reference in New Issue
Block a user