From 11f3deb9c4512b918de8f5e778bc8b9535bd62c7 Mon Sep 17 00:00:00 2001 From: JosiahWI <41302989+JosiahWI@users.noreply.github.com> Date: Tue, 13 Oct 2020 10:36:01 -0500 Subject: Pass ContentFeatures as reference to read_content_features (#10464) --- src/script/common/c_content.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/script/common/c_content.cpp') diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 147f6e3ed..a95cf94a1 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -491,13 +491,11 @@ TileDef read_tiledef(lua_State *L, int index, u8 drawtype) } /******************************************************************************/ -ContentFeatures read_content_features(lua_State *L, int index) +void read_content_features(lua_State *L, ContentFeatures &f, int index) { if(index < 0) index = lua_gettop(L) + 1 + index; - ContentFeatures f; - /* Cache existence of some callbacks */ lua_getfield(L, index, "on_construct"); if(!lua_isnil(L, -1)) f.has_on_construct = true; @@ -800,7 +798,6 @@ ContentFeatures read_content_features(lua_State *L, int index) getstringfield(L, index, "node_dig_prediction", f.node_dig_prediction); - return f; } void push_content_features(lua_State *L, const ContentFeatures &c) -- cgit v1.2.3