From 7bbd716426bf989bf071e2322a9b797cc5f78acb Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 8 Oct 2016 17:56:38 +0200 Subject: RemotePlayer/LocalPlayer Player base class proper separation (code cleanup) (patch 3 of X) * remove IGameDef from Player class, only LocalPlayer has it now * move many attributes/functions only used by LocalPlayer from Player to LocalPlayer * move many attributes/functions only used by RemotePlayer from Player to RemotePlayer * make some functions const * hudGetHotbarSelectedImage now returns const ref * RemotePlayer getHotbarSelectedImage now returns const ref * various code style fixes --- src/script/lua_api/l_object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script/lua_api/l_object.cpp') diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index 74b33da37..a1f83919c 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -1600,7 +1600,7 @@ int ObjectRef::l_hud_get_hotbar_selected_image(lua_State *L) if (player == NULL) return 0; - std::string name = getServer(L)->hudGetHotbarSelectedImage(player); + const std::string &name = getServer(L)->hudGetHotbarSelectedImage(player); lua_pushlstring(L, name.c_str(), name.size()); return 1; } -- cgit v1.2.3