]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/lua_api/l_itemstackmeta.h
Code modernization: subfolders (#6283)
[dragonfireclient.git] / src / script / lua_api / l_itemstackmeta.h
index 4ef64a91ef71805efe031664ad17ffc0c91a414d..241f04c4ce0dff953f622f5e94c8659b93f0e3f3 100644 (file)
@@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef L_ITEMSTACKMETA_H_
-#define L_ITEMSTACKMETA_H_
+#pragma once
 
 #include "lua_api/l_base.h"
 #include "lua_api/l_metadata.h"
@@ -28,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 class ItemStackMetaRef : public MetaDataRef
 {
 private:
-       ItemStack *istack;
+       ItemStack *istack = nullptr;
 
        static const char className[];
        static const luaL_Reg methods[];
@@ -47,7 +46,7 @@ class ItemStackMetaRef : public MetaDataRef
        static int gc_object(lua_State *L);
 public:
        ItemStackMetaRef(ItemStack *istack): istack(istack) {}
-       ~ItemStackMetaRef() {}
+       ~ItemStackMetaRef() = default;
 
        // Creates an ItemStackMetaRef and leaves it on top of stack
        // Not callable from Lua; all references are created on the C side.
@@ -55,5 +54,3 @@ class ItemStackMetaRef : public MetaDataRef
 
        static void Register(lua_State *L);
 };
-
-#endif