From 7528986e4449febead9b18b6118f0b096f7cf800 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sat, 19 Aug 2017 14:25:35 +0200 Subject: Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282) * Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex --- src/serverenvironment.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/serverenvironment.h') diff --git a/src/serverenvironment.h b/src/serverenvironment.h index 36f3e2067..9d84d7a48 100644 --- a/src/serverenvironment.h +++ b/src/serverenvironment.h @@ -49,8 +49,8 @@ class ServerScripting; class ActiveBlockModifier { public: - ActiveBlockModifier(){}; - virtual ~ActiveBlockModifier(){}; + ActiveBlockModifier() = default; + virtual ~ActiveBlockModifier() = default; // Set of contents to trigger on virtual const std::set &getTriggerContents() const = 0; @@ -84,7 +84,8 @@ struct LoadingBlockModifierDef std::string name; bool run_at_every_load = false; - virtual ~LoadingBlockModifierDef() {} + virtual ~LoadingBlockModifierDef() = default; + virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n){}; }; @@ -106,7 +107,7 @@ struct LBMContentMapping class LBMManager { public: - LBMManager() {} + LBMManager() = default; ~LBMManager(); // Don't call this after loadIntroductionTimes() ran. -- cgit v1.2.3