diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-17 22:19:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-17 22:19:39 +0200 |
commit | 921151d97a2fb2238ab514324fb95e2732248b96 (patch) | |
tree | 0723ab1f2c4df22492b4c2221d2974020d4dfd3d /src/script/cpp_api | |
parent | c738d1eeabbbe9164a25f6b69bc7ec1a3b44b051 (diff) | |
download | minetest-921151d97a2fb2238ab514324fb95e2732248b96.tar.gz minetest-921151d97a2fb2238ab514324fb95e2732248b96.tar.bz2 minetest-921151d97a2fb2238ab514324fb95e2732248b96.zip |
C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r-- | src/script/cpp_api/s_async.h | 5 | ||||
-rw-r--r-- | src/script/cpp_api/s_base.h | 5 | ||||
-rw-r--r-- | src/script/cpp_api/s_client.h | 4 | ||||
-rw-r--r-- | src/script/cpp_api/s_entity.h | 7 | ||||
-rw-r--r-- | src/script/cpp_api/s_env.h | 5 | ||||
-rw-r--r-- | src/script/cpp_api/s_internal.h | 6 | ||||
-rw-r--r-- | src/script/cpp_api/s_inventory.h | 7 | ||||
-rw-r--r-- | src/script/cpp_api/s_item.h | 6 | ||||
-rw-r--r-- | src/script/cpp_api/s_mainmenu.h | 5 | ||||
-rw-r--r-- | src/script/cpp_api/s_node.h | 7 | ||||
-rw-r--r-- | src/script/cpp_api/s_nodemeta.h | 5 | ||||
-rw-r--r-- | src/script/cpp_api/s_player.h | 5 | ||||
-rw-r--r-- | src/script/cpp_api/s_security.h | 6 | ||||
-rw-r--r-- | src/script/cpp_api/s_server.h | 7 |
14 files changed, 14 insertions, 66 deletions
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_ */ |