From 4d5ce8478c959a4ee5b13ef9ba7e46b28d089a21 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Thu, 25 May 2017 16:43:55 +0200 Subject: Enhance ABM performance a little bit by removing two std::set copy (#5815) * Enhance ABM performance a little bit by removing two std::set copy * ActiveBlockModifier::getTriggerContents now returns a const ref * ActiveBlockModifier::getRequiredNeighbors now returns a const ref * ActiveBlockModifier::getRequiredNeighbors is now purely virtual * Little code style fix --- src/script/lua_api/l_env.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script') diff --git a/src/script/lua_api/l_env.h b/src/script/lua_api/l_env.h index 629c6bc39..7ce19b085 100644 --- a/src/script/lua_api/l_env.h +++ b/src/script/lua_api/l_env.h @@ -203,11 +203,11 @@ public: m_simple_catch_up(simple_catch_up) { } - virtual std::set getTriggerContents() + virtual const std::set &getTriggerContents() const { return m_trigger_contents; } - virtual std::set getRequiredNeighbors() + virtual const std::set &getRequiredNeighbors() const { return m_required_neighbors; } -- cgit v1.2.3