mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00: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:
parent
618e0dd417
commit
342e9336ae
2 changed files with 31 additions and 40 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue