1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

l_server, clientenvironment, clientiface: code modernization

* use range-based for loops
* use refs on some exceptions & one setter
This commit is contained in:
Loic Blot 2017-08-17 08:11:39 +02:00
parent 9c8fec83af
commit 3e80bf933f
No known key found for this signature in database
GPG key ID: EFAA458E8C153987
4 changed files with 37 additions and 58 deletions

View file

@ -205,7 +205,7 @@ enum ClientStateEvent
*/
struct PrioritySortedBlockTransfer
{
PrioritySortedBlockTransfer(float a_priority, v3s16 a_pos, u16 a_peer_id)
PrioritySortedBlockTransfer(float a_priority, const v3s16 &a_pos, u16 a_peer_id)
{
priority = a_priority;
pos = a_pos;
@ -246,8 +246,8 @@ public:
bool isMechAllowed(AuthMechanism mech)
{ return allowed_auth_mechs & mech; }
RemoteClient() {}
~RemoteClient() {}
RemoteClient() = default;
~RemoteClient() = default;
/*
Finds block that should be sent next to the client.
@ -495,7 +495,6 @@ private:
// Environment
ServerEnvironment *m_env;
std::mutex m_env_mutex;
float m_print_info_timer;