diff options
Diffstat (limited to 'src/script')
49 files changed, 70 insertions, 211 deletions
diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h index 9b8796297..c4440c5d9 100644 --- a/src/script/common/c_content.h +++ b/src/script/common/c_content.h @@ -25,8 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., /******************************************************************************/ /******************************************************************************/ -#ifndef C_CONTENT_H_ -#define C_CONTENT_H_ +#pragma once extern "C" { #include <lua.h> @@ -187,5 +186,3 @@ void push_pointed_thing (lua_State *L, const PointedThing & void push_objectRef (lua_State *L, const u16 id); extern struct EnumString es_TileAnimationType[]; - -#endif /* C_CONTENT_H_ */ diff --git a/src/script/common/c_converter.h b/src/script/common/c_converter.h index f7d9294d6..bba01f545 100644 --- a/src/script/common/c_converter.h +++ b/src/script/common/c_converter.h @@ -24,8 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., /* not being a script/modapi file!!!!!!!! */ /******************************************************************************/ /******************************************************************************/ -#ifndef C_CONVERTER_H_ -#define C_CONVERTER_H_ +#pragma once #include <vector> #include <unordered_map> @@ -117,5 +116,3 @@ size_t write_array_slice_float(lua_State *L, int table_index, float *data, v3u16 data_size, v3u16 slice_offset, v3u16 slice_size); size_t write_array_slice_u16(lua_State *L, int table_index, u16 *data, v3u16 data_size, v3u16 slice_offset, v3u16 slice_size); - -#endif /* C_CONVERTER_H_ */ diff --git a/src/script/common/c_internal.h b/src/script/common/c_internal.h index b77f0a7c3..2548ac979 100644 --- a/src/script/common/c_internal.h +++ b/src/script/common/c_internal.h @@ -24,8 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., /******************************************************************************/ /******************************************************************************/ -#ifndef C_INTERNAL_H_ -#define C_INTERNAL_H_ +#pragma once extern "C" { #include <lua.h> @@ -106,5 +105,3 @@ void script_error(lua_State *L, int pcall_result, const char *mod, const char *f void script_run_callbacks_f(lua_State *L, int nargs, RunCallbacksMode mode, const char *fxn); void log_deprecated(lua_State *L, const std::string &message); - -#endif /* C_INTERNAL_H_ */ diff --git a/src/script/common/c_types.h b/src/script/common/c_types.h index 056f30251..86bfb0b6b 100644 --- a/src/script/common/c_types.h +++ b/src/script/common/c_types.h @@ -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 C_TYPES_H_ -#define C_TYPES_H_ +#pragma once extern "C" { #include "lua.h" @@ -60,5 +59,3 @@ public: extern EnumString es_ItemType[]; - -#endif /* C_TYPES_H_ */ diff --git a/src/script/cpp_api/s_async.h b/src/script/cpp_api/s_async.h index aa1559ed1..01c3ad005 100644 --- a/src/script/cpp_api/s_async.h +++ b/src/script/cpp_api/s_async.h @@ -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 CPP_API_ASYNC_EVENTS_HEADER -#define CPP_API_ASYNC_EVENTS_HEADER +#pragma once #include <vector> #include <deque> @@ -156,5 +155,3 @@ private: // Counter semaphore for job dispatching Semaphore jobQueueCounter; }; - -#endif // CPP_API_ASYNC_EVENTS_HEADER diff --git a/src/script/cpp_api/s_base.h b/src/script/cpp_api/s_base.h index ff92bdf93..b2c8b4a18 100644 --- a/src/script/cpp_api/s_base.h +++ b/src/script/cpp_api/s_base.h @@ -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 S_BASE_H_ -#define S_BASE_H_ +#pragma once #include <iostream> #include <string> @@ -147,5 +146,3 @@ private: GUIEngine *m_guiengine = nullptr; ScriptingType m_type; }; - -#endif /* S_BASE_H_ */ diff --git a/src/script/cpp_api/s_client.h b/src/script/cpp_api/s_client.h index 9133637a6..074a68e39 100644 --- a/src/script/cpp_api/s_client.h +++ b/src/script/cpp_api/s_client.h @@ -18,8 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef S_CLIENT_H_ -#define S_CLIENT_H_ +#pragma once #include "util/pointedthing.h" #include "cpp_api/s_base.h" @@ -60,4 +59,3 @@ public: void setEnv(ClientEnvironment *env); }; -#endif diff --git a/src/script/cpp_api/s_entity.h b/src/script/cpp_api/s_entity.h index 07b06edff..173e24c30 100644 --- a/src/script/cpp_api/s_entity.h +++ b/src/script/cpp_api/s_entity.h @@ -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 S_ENTITY_H_ -#define S_ENTITY_H_ +#pragma once #include "cpp_api/s_base.h" #include "irr_v3d.h" @@ -45,7 +44,3 @@ public: void luaentity_Rightclick(u16 id, ServerActiveObject *clicker); }; - - - -#endif /* S_ENTITY_H_ */ diff --git a/src/script/cpp_api/s_env.h b/src/script/cpp_api/s_env.h index e07024565..232a08aaf 100644 --- a/src/script/cpp_api/s_env.h +++ b/src/script/cpp_api/s_env.h @@ -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 S_ENV_H_ -#define S_ENV_H_ +#pragma once #include "cpp_api/s_base.h" #include "irr_v3d.h" @@ -44,5 +43,3 @@ public: void initializeEnvironment(ServerEnvironment *env); }; - -#endif /* S_ENV_H_ */ diff --git a/src/script/cpp_api/s_internal.h b/src/script/cpp_api/s_internal.h index b493cb6fa..fc049f922 100644 --- a/src/script/cpp_api/s_internal.h +++ b/src/script/cpp_api/s_internal.h @@ -24,8 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., /******************************************************************************/ /******************************************************************************/ -#ifndef S_INTERNAL_H_ -#define S_INTERNAL_H_ +#pragma once #include <thread> #include "common/c_internal.h" @@ -84,6 +83,3 @@ private: lua_State *L = getStack(); \ assert(lua_checkstack(L, 20)); \ StackUnroller stack_unroller(L); - -#endif /* S_INTERNAL_H_ */ - diff --git a/src/script/cpp_api/s_inventory.h b/src/script/cpp_api/s_inventory.h index d1a81de80..93ec7fd42 100644 --- a/src/script/cpp_api/s_inventory.h +++ b/src/script/cpp_api/s_inventory.h @@ -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 S_INVENTORY_H_ -#define S_INVENTORY_H_ +#pragma once #include "cpp_api/s_base.h" @@ -65,7 +64,3 @@ private: bool getDetachedInventoryCallback( const std::string &name, const char *callbackname); }; - - - -#endif /* S_INVENTORY_H_ */ diff --git a/src/script/cpp_api/s_item.h b/src/script/cpp_api/s_item.h index 6ceb4b559..561f3a553 100644 --- a/src/script/cpp_api/s_item.h +++ b/src/script/cpp_api/s_item.h @@ -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 S_ITEM_H_ -#define S_ITEM_H_ +#pragma once #include "cpp_api/s_base.h" #include "irr_v3d.h" @@ -58,6 +57,3 @@ protected: void pushPointedThing(const PointedThing& pointed); }; - - -#endif /* S_ITEM_H_ */ diff --git a/src/script/cpp_api/s_mainmenu.h b/src/script/cpp_api/s_mainmenu.h index 8d5895817..f89d5d889 100644 --- a/src/script/cpp_api/s_mainmenu.h +++ b/src/script/cpp_api/s_mainmenu.h @@ -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 S_MAINMENU_H_ -#define S_MAINMENU_H_ +#pragma once #include "cpp_api/s_base.h" #include "util/string.h" @@ -44,5 +43,3 @@ public: */ void handleMainMenuButtons(const StringMap &fields); }; - -#endif /* S_MAINMENU_H_ */ diff --git a/src/script/cpp_api/s_node.h b/src/script/cpp_api/s_node.h index eb127909d..92f07cee7 100644 --- a/src/script/cpp_api/s_node.h +++ b/src/script/cpp_api/s_node.h @@ -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 S_NODE_H_ -#define S_NODE_H_ +#pragma once #include "irr_v3d.h" #include "cpp_api/s_base.h" @@ -58,7 +57,3 @@ public: static struct EnumString es_LiquidType[]; static struct EnumString es_NodeBoxType[]; }; - - - -#endif /* S_NODE_H_ */ diff --git a/src/script/cpp_api/s_nodemeta.h b/src/script/cpp_api/s_nodemeta.h index c2ebeba6d..51b8a5eb2 100644 --- a/src/script/cpp_api/s_nodemeta.h +++ b/src/script/cpp_api/s_nodemeta.h @@ -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 S_NODEMETA_H_ -#define S_NODEMETA_H_ +#pragma once #include "cpp_api/s_base.h" #include "cpp_api/s_item.h" @@ -63,5 +62,3 @@ public: private: }; - -#endif /* S_NODEMETA_H_ */ diff --git a/src/script/cpp_api/s_player.h b/src/script/cpp_api/s_player.h index 9b4611f9e..70b06bfc7 100644 --- a/src/script/cpp_api/s_player.h +++ b/src/script/cpp_api/s_player.h @@ -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 S_PLAYER_H_ -#define S_PLAYER_H_ +#pragma once #include "cpp_api/s_base.h" #include "irr_v3d.h" @@ -46,5 +45,3 @@ public: void on_playerReceiveFields(ServerActiveObject *player, const std::string &formname, const StringMap &fields); }; - -#endif /* S_PLAYER_H_ */ diff --git a/src/script/cpp_api/s_security.h b/src/script/cpp_api/s_security.h index 059dccef1..c31aff26b 100644 --- a/src/script/cpp_api/s_security.h +++ b/src/script/cpp_api/s_security.h @@ -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 S_SECURITY_H -#define S_SECURITY_H +#pragma once #include "cpp_api/s_base.h" @@ -75,6 +74,3 @@ private: static int sl_os_rename(lua_State *L); static int sl_os_remove(lua_State *L); }; - -#endif - diff --git a/src/script/cpp_api/s_server.h b/src/script/cpp_api/s_server.h index a63e36320..74de19bee 100644 --- a/src/script/cpp_api/s_server.h +++ b/src/script/cpp_api/s_server.h @@ -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 S_SERVER_H_ -#define S_SERVER_H_ +#pragma once #include "cpp_api/s_base.h" #include <set> @@ -46,7 +45,3 @@ private: void getAuthHandler(); void readPrivileges(int index, std::set<std::string> &result); }; - - - -#endif /* S_SERVER_H_ */ diff --git a/src/script/lua_api/l_areastore.h b/src/script/lua_api/l_areastore.h index 9cb6249d0..56acd9083 100644 --- a/src/script/lua_api/l_areastore.h +++ b/src/script/lua_api/l_areastore.h @@ -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_AREA_STORE_H_ -#define L_AREA_STORE_H_ +#pragma once #include "lua_api/l_base.h" @@ -63,5 +62,3 @@ public: static void Register(lua_State *L); }; - -#endif // L_AREA_STORE_H_ diff --git a/src/script/lua_api/l_base.h b/src/script/lua_api/l_base.h index e9b28b36a..0a75b4c1a 100644 --- a/src/script/lua_api/l_base.h +++ b/src/script/lua_api/l_base.h @@ -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_BASE_H_ -#define L_BASE_H_ +#pragma once #include "common/c_types.h" #include "common/c_internal.h" @@ -71,5 +70,3 @@ public: lua_CFunction func, int top); }; - -#endif /* L_BASE_H_ */ diff --git a/src/script/lua_api/l_camera.h b/src/script/lua_api/l_camera.h index c4a0f877c..a7103c9b0 100644 --- a/src/script/lua_api/l_camera.h +++ b/src/script/lua_api/l_camera.h @@ -1,5 +1,23 @@ -#ifndef L_CAMERA_H -#define L_CAMERA_H +/* +Minetest +Copyright (C) 2013-2017 celeron55, Perttu Ahola <celeron55@gmail.com> + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#pragma once #include "l_base.h" @@ -40,5 +58,3 @@ public: static void Register(lua_State *L); }; - -#endif // L_CAMERA_H diff --git a/src/script/lua_api/l_client.h b/src/script/lua_api/l_client.h index 8a3c7f0e8..791038f7d 100644 --- a/src/script/lua_api/l_client.h +++ b/src/script/lua_api/l_client.h @@ -18,8 +18,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_CLIENT_H_ -#define L_CLIENT_H_ +#pragma once #include "lua_api/l_base.h" #include "itemdef.h" @@ -98,5 +97,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - -#endif diff --git a/src/script/lua_api/l_craft.h b/src/script/lua_api/l_craft.h index eb2bce706..9002b23ef 100644 --- a/src/script/lua_api/l_craft.h +++ b/src/script/lua_api/l_craft.h @@ -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_CRAFT_H_ -#define L_CRAFT_H_ +#pragma once #include <string> #include <vector> @@ -47,5 +46,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - -#endif /* L_CRAFT_H_ */ diff --git a/src/script/lua_api/l_env.h b/src/script/lua_api/l_env.h index f380d8d6f..4d295b6eb 100644 --- a/src/script/lua_api/l_env.h +++ b/src/script/lua_api/l_env.h @@ -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_ENV_H_ -#define L_ENV_H_ +#pragma once #include "lua_api/l_base.h" #include "serverenvironment.h" @@ -297,5 +296,3 @@ struct ScriptCallbackState { unsigned int refcount; std::string origin; }; - -#endif /* L_ENV_H_ */ diff --git a/src/script/lua_api/l_http.h b/src/script/lua_api/l_http.h index 077ade691..3d9cdad29 100644 --- a/src/script/lua_api/l_http.h +++ b/src/script/lua_api/l_http.h @@ -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_HTTP_H_ -#define L_HTTP_H_ +#pragma once #include "lua_api/l_base.h" #include "config.h" @@ -46,5 +45,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - -#endif /* L_HTTP_H_ */ diff --git a/src/script/lua_api/l_internal.h b/src/script/lua_api/l_internal.h index e9b689931..bbedfe46e 100644 --- a/src/script/lua_api/l_internal.h +++ b/src/script/lua_api/l_internal.h @@ -24,8 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., /******************************************************************************/ /******************************************************************************/ -#ifndef L_INTERNAL_H_ -#define L_INTERNAL_H_ +#pragma once #include "common/c_internal.h" @@ -44,5 +43,3 @@ with this program; if not, write to the Free Software Foundation, Inc., #define GET_ENV_PTR \ MAP_LOCK_REQUIRED; \ GET_ENV_PTR_NO_MAP_LOCK - -#endif /* L_INTERNAL_H_ */ diff --git a/src/script/lua_api/l_inventory.h b/src/script/lua_api/l_inventory.h index 502827a11..f12377ece 100644 --- a/src/script/lua_api/l_inventory.h +++ b/src/script/lua_api/l_inventory.h @@ -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_INVENTORY_H_ -#define L_INVENTORY_H_ +#pragma once #include "lua_api/l_base.h" @@ -126,5 +125,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - -#endif /* L_INVENTORY_H_ */ diff --git a/src/script/lua_api/l_item.h b/src/script/lua_api/l_item.h index b4efaefc8..6aa62808b 100644 --- a/src/script/lua_api/l_item.h +++ b/src/script/lua_api/l_item.h @@ -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_ITEM_H_ -#define L_ITEM_H_ +#pragma once #include "lua_api/l_base.h" #include "inventory.h" // ItemStack @@ -147,7 +146,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - - - -#endif /* L_ITEM_H_ */ diff --git a/src/script/lua_api/l_itemstackmeta.h b/src/script/lua_api/l_itemstackmeta.h index 6e841d2dc..cfaece794 100644 --- a/src/script/lua_api/l_itemstackmeta.h +++ b/src/script/lua_api/l_itemstackmeta.h @@ -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" @@ -55,5 +54,3 @@ public: static void Register(lua_State *L); }; - -#endif diff --git a/src/script/lua_api/l_localplayer.h b/src/script/lua_api/l_localplayer.h index e618e6be5..dcb5c878c 100644 --- a/src/script/lua_api/l_localplayer.h +++ b/src/script/lua_api/l_localplayer.h @@ -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 MINETEST_L_LOCALPLAYER_H -#define MINETEST_L_LOCALPLAYER_H +#pragma once #include "l_base.h" @@ -81,5 +80,3 @@ public: static void Register(lua_State *L); }; - -#endif // MINETEST_L_LOCALPLAYER_H diff --git a/src/script/lua_api/l_mainmenu.h b/src/script/lua_api/l_mainmenu.h index 4be07576c..ffaab7dca 100644 --- a/src/script/lua_api/l_mainmenu.h +++ b/src/script/lua_api/l_mainmenu.h @@ -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_MAINMENU_H_ -#define L_MAINMENU_H_ +#pragma once #include "lua_api/l_base.h" @@ -151,5 +150,3 @@ public: static void InitializeAsync(lua_State *L, int top); }; - -#endif /* L_MAINMENU_H_ */ diff --git a/src/script/lua_api/l_mapgen.h b/src/script/lua_api/l_mapgen.h index a26c8b950..89b825be2 100644 --- a/src/script/lua_api/l_mapgen.h +++ b/src/script/lua_api/l_mapgen.h @@ -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_MAPGEN_H_ -#define L_MAPGEN_H_ +#pragma once #include "lua_api/l_base.h" @@ -119,5 +118,3 @@ public: static struct EnumString es_SchematicFormatType[]; static struct EnumString es_NodeResolveMethod[]; }; - -#endif /* L_MAPGEN_H_ */ diff --git a/src/script/lua_api/l_metadata.h b/src/script/lua_api/l_metadata.h index a479e64b0..5a7c7e7f7 100644 --- a/src/script/lua_api/l_metadata.h +++ b/src/script/lua_api/l_metadata.h @@ -16,8 +16,8 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef L_METADATA_H_ -#define L_METADATA_H_ + +#pragma once #include "irrlichttypes_bloated.h" #include "lua_api/l_base.h" @@ -72,5 +72,3 @@ protected: // equals(self, other) static int l_equals(lua_State *L); }; - -#endif /* L_NODEMETA_H_ */ diff --git a/src/script/lua_api/l_minimap.h b/src/script/lua_api/l_minimap.h index d4fbf6330..2d0e6ae9f 100644 --- a/src/script/lua_api/l_minimap.h +++ b/src/script/lua_api/l_minimap.h @@ -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_MINIMAP_H_ -#define L_MINIMAP_H_ +#pragma once #include "l_base.h" @@ -61,5 +60,3 @@ public: static void Register(lua_State *L); }; - -#endif // L_MINIMAP_H_ diff --git a/src/script/lua_api/l_nodemeta.h b/src/script/lua_api/l_nodemeta.h index 72d26ef36..683f79932 100644 --- a/src/script/lua_api/l_nodemeta.h +++ b/src/script/lua_api/l_nodemeta.h @@ -16,8 +16,8 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef L_NODEMETA_H_ -#define L_NODEMETA_H_ + +#pragma once #include "lua_api/l_base.h" #include "lua_api/l_metadata.h" @@ -93,5 +93,3 @@ public: static void Register(lua_State *L); static void RegisterClient(lua_State *L); }; - -#endif /* L_NODEMETA_H_ */ diff --git a/src/script/lua_api/l_nodetimer.h b/src/script/lua_api/l_nodetimer.h index df77ed98f..c7cc76244 100644 --- a/src/script/lua_api/l_nodetimer.h +++ b/src/script/lua_api/l_nodetimer.h @@ -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_NODETIMER_H_ -#define L_NODETIMER_H_ +#pragma once #include "irr_v3d.h" #include "lua_api/l_base.h" @@ -62,5 +61,3 @@ public: static void Register(lua_State *L); }; - -#endif /* L_NODETIMER_H_ */ diff --git a/src/script/lua_api/l_noise.h b/src/script/lua_api/l_noise.h index f252b5ba2..8af4fbd12 100644 --- a/src/script/lua_api/l_noise.h +++ b/src/script/lua_api/l_noise.h @@ -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_NOISE_H_ -#define L_NOISE_H_ +#pragma once #include "irr_v3d.h" #include "lua_api/l_base.h" @@ -193,5 +192,3 @@ public: static void Register(lua_State *L); }; - -#endif /* L_NOISE_H_ */ diff --git a/src/script/lua_api/l_object.h b/src/script/lua_api/l_object.h index 77874f00c..a2438e434 100644 --- a/src/script/lua_api/l_object.h +++ b/src/script/lua_api/l_object.h @@ -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_OBJECT_H_ -#define L_OBJECT_H_ +#pragma once #include "lua_api/l_base.h" #include "irrlichttypes.h" @@ -333,5 +332,3 @@ private: static int l_get_nametag_attributes(lua_State *L); }; - -#endif /* L_OBJECT_H_ */ diff --git a/src/script/lua_api/l_particles.h b/src/script/lua_api/l_particles.h index c593f47e4..122810b6d 100644 --- a/src/script/lua_api/l_particles.h +++ b/src/script/lua_api/l_particles.h @@ -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_PARTICLES_H_ -#define L_PARTICLES_H_ +#pragma once #include "lua_api/l_base.h" @@ -31,7 +30,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - - - -#endif /* L_PARTICLES_H_ */ diff --git a/src/script/lua_api/l_rollback.h b/src/script/lua_api/l_rollback.h index 3b01c0d8b..c26ff634e 100644 --- a/src/script/lua_api/l_rollback.h +++ b/src/script/lua_api/l_rollback.h @@ -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_ROLLBACK_H_ -#define L_ROLLBACK_H_ +#pragma once #include "lua_api/l_base.h" @@ -34,5 +33,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - -#endif /* L_ROLLBACK_H_ */ diff --git a/src/script/lua_api/l_server.h b/src/script/lua_api/l_server.h index 251a0ce89..3aa1785a2 100644 --- a/src/script/lua_api/l_server.h +++ b/src/script/lua_api/l_server.h @@ -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_SERVER_H_ -#define L_SERVER_H_ +#pragma once #include "lua_api/l_base.h" @@ -110,5 +109,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - -#endif /* L_SERVER_H_ */ diff --git a/src/script/lua_api/l_settings.h b/src/script/lua_api/l_settings.h index a664b4494..500917f0a 100644 --- a/src/script/lua_api/l_settings.h +++ b/src/script/lua_api/l_settings.h @@ -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_SETTINGS_H_ -#define L_SETTINGS_H_ +#pragma once #include "lua_api/l_base.h" @@ -77,5 +76,3 @@ public: static void Register(lua_State *L); }; - -#endif diff --git a/src/script/lua_api/l_sound.h b/src/script/lua_api/l_sound.h index 1f0c1eba1..888a0f30b 100644 --- a/src/script/lua_api/l_sound.h +++ b/src/script/lua_api/l_sound.h @@ -18,8 +18,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_SOUND_H_ -#define L_SOUND_H_ +#pragma once #include "lua_api/l_base.h" @@ -32,5 +31,3 @@ private: public: static void Initialize(lua_State *L, int top); }; - -#endif diff --git a/src/script/lua_api/l_storage.h b/src/script/lua_api/l_storage.h index eaf7ec9f6..4e808c393 100644 --- a/src/script/lua_api/l_storage.h +++ b/src/script/lua_api/l_storage.h @@ -18,8 +18,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_STORAGE_H__ -#define __L_STORAGE_H__ +#pragma once #include "l_metadata.h" #include "lua_api/l_base.h" @@ -59,5 +58,3 @@ public: static StorageRef *checkobject(lua_State *L, int narg); static ModMetadata *getobject(StorageRef *ref); }; - -#endif /* __L_STORAGE_H__ */ diff --git a/src/script/lua_api/l_util.h b/src/script/lua_api/l_util.h index b75d9db29..b7aafe8d5 100644 --- a/src/script/lua_api/l_util.h +++ b/src/script/lua_api/l_util.h @@ -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_UTIL_H_ -#define L_UTIL_H_ +#pragma once #include "lua_api/l_base.h" @@ -100,5 +99,3 @@ public: static void InitializeAsync(AsyncEngine &engine); }; - -#endif /* L_UTIL_H_ */ diff --git a/src/script/lua_api/l_vmanip.h b/src/script/lua_api/l_vmanip.h index e706f3727..15ab9eef8 100644 --- a/src/script/lua_api/l_vmanip.h +++ b/src/script/lua_api/l_vmanip.h @@ -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_VMANIP_H_ -#define L_VMANIP_H_ +#pragma once #include <map> #include "irr_v3d.h" @@ -80,5 +79,3 @@ public: static void Register(lua_State *L); }; - -#endif /* L_VMANIP_H_ */ diff --git a/src/script/scripting_client.h b/src/script/scripting_client.h index 822bff773..721bb2b05 100644 --- a/src/script/scripting_client.h +++ b/src/script/scripting_client.h @@ -18,8 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef CLIENT_SCRIPTING_H_ -#define CLIENT_SCRIPTING_H_ +#pragma once #include "cpp_api/s_base.h" #include "cpp_api/s_client.h" @@ -41,4 +40,3 @@ public: private: virtual void InitializeModApi(lua_State *L, int top); }; -#endif diff --git a/src/script/scripting_mainmenu.h b/src/script/scripting_mainmenu.h index 8e251af03..9e23bdc1b 100644 --- a/src/script/scripting_mainmenu.h +++ b/src/script/scripting_mainmenu.h @@ -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 SCRIPTING_MAINMENU_H_ -#define SCRIPTING_MAINMENU_H_ +#pragma once #include "cpp_api/s_base.h" #include "cpp_api/s_mainmenu.h" @@ -47,6 +46,3 @@ private: AsyncEngine asyncEngine; }; - - -#endif /* SCRIPTING_MAINMENU_H_ */ diff --git a/src/script/scripting_server.h b/src/script/scripting_server.h index fd97ea40b..b549a1bc9 100644 --- a/src/script/scripting_server.h +++ b/src/script/scripting_server.h @@ -17,9 +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 SERVER_SCRIPTING_H_ -#define SERVER_SCRIPTING_H_ - +#pragma once #include "cpp_api/s_base.h" #include "cpp_api/s_entity.h" #include "cpp_api/s_env.h" @@ -53,5 +51,3 @@ private: }; void log_deprecated(const std::string &message); - -#endif /* SCRIPTING_GAME_H_ */ |