diff options
| author | 2021-05-30 20:37:54 +0100 | |
|---|---|---|
| committer | 2021-05-30 20:37:54 +0100 | |
| commit | 02340285c564a7e82105137192d46d554a6fce3a (patch) | |
| tree | 696d1a6249841de62c3fed70310c2a347fc66732 /src/modules/m_spanningtree/treeserver.cpp | |
| parent | Add a workaround for a bug in GitHub Actions. (diff) | |
Added -Wshorten-64-to-32 and fixed all warnings.
Diffstat (limited to 'src/modules/m_spanningtree/treeserver.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index f0e85828c..dfe7edb3d 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -185,9 +185,9 @@ void TreeServer::SQuitChild(TreeServer* server, const std::string& reason, bool server->SQuitInternal(num_lost_servers, error); const std::string quitreason = GetName() + " " + server->GetName(); - unsigned int num_lost_users = QuitUsers(quitreason); + size_t num_lost_users = QuitUsers(quitreason); - ServerInstance->SNO.WriteToSnoMask(IsRoot() ? 'l' : 'L', "Netsplit complete, lost \002%u\002 user%s on \002%u\002 server%s.", + ServerInstance->SNO.WriteToSnoMask(IsRoot() ? 'l' : 'L', "Netsplit complete, lost \002%zu\002 user%s on \002%u\002 server%s.", num_lost_users, num_lost_users != 1 ? "s" : "", num_lost_servers, num_lost_servers != 1 ? "s" : ""); // No-op if the socket is already closed (i.e. it called us) @@ -214,12 +214,12 @@ void TreeServer::SQuitInternal(unsigned int& num_lost_servers, bool error) Utils->Creator->linkeventprov.Call(&ServerProtocol::LinkEventListener::OnServerSplit, this, error); } -unsigned int TreeServer::QuitUsers(const std::string& reason) +size_t TreeServer::QuitUsers(const std::string& reason) { std::string publicreason = Utils->HideSplits ? "*.net *.split" : reason; const user_hash& users = ServerInstance->Users.GetUsers(); - unsigned int original_size = users.size(); + size_t original_size = users.size(); for (user_hash::const_iterator i = users.begin(); i != users.end(); ) { User* user = i->second; |
