aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-05-25 16:43:55 +0200
committerGitHub <noreply@github.com>2017-05-25 16:43:55 +0200
commit4d5ce8478c959a4ee5b13ef9ba7e46b28d089a21 (patch)
treed635cf0dfd7b5040c7c24378ac4c25e59cf48f61 /src/script/lua_api
parent5b338638e0e5743d8acfb48b72e17b671968722f (diff)
downloadminetest-4d5ce8478c959a4ee5b13ef9ba7e46b28d089a21.tar.gz
minetest-4d5ce8478c959a4ee5b13ef9ba7e46b28d089a21.tar.bz2
minetest-4d5ce8478c959a4ee5b13ef9ba7e46b28d089a21.zip
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
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_env.h4
1 files changed, 2 insertions, 2 deletions
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<std::string> getTriggerContents()
+ virtual const std::set<std::string> &getTriggerContents() const
{
return m_trigger_contents;
}
- virtual std::set<std::string> getRequiredNeighbors()
+ virtual const std::set<std::string> &getRequiredNeighbors() const
{
return m_required_neighbors;
}