From 13e995b811e80dc48c0769274d3dca3a2221b843 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Thu, 17 Aug 2017 23:02:50 +0200 Subject: Modernize src/c* src/d* and src/e* files (#6263) * Modernize src/c* src/d* and src/e* files * default operator * redundant init * delete default constructors on CraftDefinition childs (never used) * fix some missing init values * const ref fix reported by clang-tidy * ranged-based for loops * simple conditions & returns * empty stl function instead of size * emplace_back stl function instead of push_back + construct temp obj * auto for some iterators * code style fixes * c++ stl headers instead of C stl headers (stdio.h -> cstdio) --- src/content_sao.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/content_sao.h') diff --git a/src/content_sao.h b/src/content_sao.h index 39822bb62..160ac7f43 100644 --- a/src/content_sao.h +++ b/src/content_sao.h @@ -29,7 +29,7 @@ class UnitSAO: public ServerActiveObject { public: UnitSAO(ServerEnvironment *env, v3f pos); - virtual ~UnitSAO() {} + virtual ~UnitSAO() = default; virtual void setYaw(const float yaw) { m_yaw = yaw; } float getYaw() const { return m_yaw; }; @@ -156,7 +156,7 @@ class LagPool float m_pool = 15.0f; float m_max = 15.0f; public: - LagPool() {} + LagPool() = default; void setMax(float new_max) { @@ -323,7 +323,7 @@ public: m_time_from_last_punch = 0.0; return r; } - void noCheatDigStart(v3s16 p) + void noCheatDigStart(const v3s16 &p) { m_nocheat_dig_pos = p; m_nocheat_dig_time = 0; -- cgit v1.2.3