mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 02:15:22 +02:00
server.cpp: code modernization
* Use more for range based loops * Simplify some tests * Code style fixes * connection.h: better PeerChange constructor instead of creating uninitalized object and then affect variables
This commit is contained in:
@@ -586,6 +586,10 @@ enum PeerChangeType
|
||||
};
|
||||
struct PeerChange
|
||||
{
|
||||
PeerChange(PeerChangeType t, u16 _peer_id, bool _timeout):
|
||||
type(t), peer_id(_peer_id), timeout(_timeout) {}
|
||||
PeerChange() = delete;
|
||||
|
||||
PeerChangeType type;
|
||||
u16 peer_id;
|
||||
bool timeout;
|
||||
|
Reference in New Issue
Block a user