From 24eb730c72d0a0115504cbe32f81b256bcf88e86 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Tue, 7 Jul 2015 17:35:58 +1000 Subject: [PATCH] Switched to the #pragma once system --- client/base_scene.hpp | 5 +---- client/channels.hpp | 5 +---- client/client_application.hpp | 5 +---- client/client_utilities/terminal_error.hpp | 5 +---- client/entities/base_character.hpp | 5 +---- client/entities/base_monster.hpp | 5 +---- client/entities/entity.hpp | 5 +---- client/entities/local_character.hpp | 5 +---- client/gameplay_scenes/world.hpp | 5 +---- client/menu_scenes/disconnected_screen.hpp | 5 +---- client/menu_scenes/lobby_menu.hpp | 5 +---- client/menu_scenes/main_menu.hpp | 5 +---- client/menu_scenes/options_menu.hpp | 5 +---- client/menu_scenes/splash_screen.hpp | 5 +---- client/scene_list.hpp | 5 +---- common/debugging/timer.hpp | 5 +---- common/gameplay/character_defines.hpp | 5 +---- common/graphics/image.hpp | 5 +---- common/graphics/sprite_sheet.hpp | 5 +---- common/graphics/tile_sheet.hpp | 5 +---- common/map/region.hpp | 5 +---- common/map/region_api.hpp | 5 +---- common/map/region_pager_api.hpp | 5 +---- common/map/region_pager_base.hpp | 5 +---- common/map/region_pager_lua.hpp | 5 +---- common/network/packet_types/character_packet.hpp | 5 +---- common/network/packet_types/client_packet.hpp | 5 +---- common/network/packet_types/monster_packet.hpp | 5 +---- common/network/packet_types/region_packet.hpp | 5 +---- common/network/packet_types/serial_packet_base.hpp | 5 +---- common/network/packet_types/server_packet.hpp | 5 +---- common/network/packet_types/text_packet.hpp | 5 +---- common/network/serial_packet.hpp | 5 +---- common/network/serial_packet_type.hpp | 5 +---- common/network/serial_utility.hpp | 5 +---- common/network/udp_network_utility.hpp | 5 +---- common/ui/button.hpp | 5 +---- common/ui/menu_bar.hpp | 5 +---- common/ui/raster_font.hpp | 5 +---- common/utilities/bounding_box.hpp | 5 +---- common/utilities/config_utility.hpp | 5 +---- common/utilities/frame_rate.hpp | 5 +---- common/utilities/ip_operators.hpp | 5 +---- common/utilities/singleton.hpp | 5 +---- common/utilities/vector2.hpp | 5 +---- server/accounts/account_data.hpp | 5 +---- server/accounts/account_manager.hpp | 5 +---- server/characters/character_api.hpp | 5 +---- server/characters/character_data.hpp | 5 +---- server/characters/character_manager.hpp | 5 +---- server/characters/character_manager_api.hpp | 5 +---- server/clients/client_data.hpp | 5 +---- server/clients/client_manager.hpp | 5 +---- server/entities/entity.hpp | 5 +---- server/entities/entity_api.hpp | 5 +---- server/monsters/monster_api.hpp | 5 +---- server/monsters/monster_data.hpp | 5 +---- server/monsters/monster_manager.hpp | 5 +---- server/monsters/monster_manager_api.hpp | 5 +---- server/rooms/room_api.hpp | 5 +---- server/rooms/room_data.hpp | 5 +---- server/rooms/room_manager.hpp | 5 +---- server/rooms/room_manager_api.hpp | 6 +----- server/server_application.hpp | 5 +---- server/server_utilities/network_api.hpp | 5 +---- server/server_utilities/server_utilities.hpp | 5 +---- server/server_utilities/sql_tools.hpp | 5 +---- server/triggers/trigger_api.hpp | 5 +---- server/triggers/trigger_data.hpp | 5 +---- server/triggers/trigger_manager.hpp | 5 +---- server/triggers/trigger_manager_api.hpp | 5 +---- 71 files changed, 71 insertions(+), 285 deletions(-) diff --git a/client/base_scene.hpp b/client/base_scene.hpp index aae6161..4292e6f 100644 --- a/client/base_scene.hpp +++ b/client/base_scene.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef BASESCENE_HPP_ -#define BASESCENE_HPP_ +#pragma once #include "scene_list.hpp" @@ -70,5 +69,3 @@ private: static SDL_Surface* screen; SceneList nextScene = SceneList::CONTINUE; }; - -#endif diff --git a/client/channels.hpp b/client/channels.hpp index 431b877..362463a 100644 --- a/client/channels.hpp +++ b/client/channels.hpp @@ -19,11 +19,8 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CHANNELS_HPP_ -#define CHANNELS_HPP_ +#pragma once enum Channels { SERVER = 0 }; - -#endif diff --git a/client/client_application.hpp b/client/client_application.hpp index 6f6fc0b..90da656 100644 --- a/client/client_application.hpp +++ b/client/client_application.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CLIENTAPPLICATION_HPP_ -#define CLIENTAPPLICATION_HPP_ +#pragma once #include "scene_list.hpp" #include "base_scene.hpp" @@ -54,5 +53,3 @@ private: int clientIndex = -1; int accountIndex = -1; }; - -#endif diff --git a/client/client_utilities/terminal_error.hpp b/client/client_utilities/terminal_error.hpp index 8a7216b..0735247 100644 --- a/client/client_utilities/terminal_error.hpp +++ b/client/client_utilities/terminal_error.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TERMINALERROR_HPP_ -#define TERMINALERROR_HPP_ +#pragma once #include #include @@ -30,5 +29,3 @@ public: explicit terminal_error(const std::string& str): runtime_error(str) {} explicit terminal_error(const char* cstr): runtime_error(cstr) {} }; - -#endif diff --git a/client/entities/base_character.hpp b/client/entities/base_character.hpp index cd38a6a..6206c4d 100644 --- a/client/entities/base_character.hpp +++ b/client/entities/base_character.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef BASECHARACTER_HPP_ -#define BASECHARACTER_HPP_ +#pragma once //components #include "character_defines.hpp" @@ -51,5 +50,3 @@ protected: std::string handle; std::string avatar; }; - -#endif diff --git a/client/entities/base_monster.hpp b/client/entities/base_monster.hpp index 328008a..0cc2032 100644 --- a/client/entities/base_monster.hpp +++ b/client/entities/base_monster.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef BASEMONSTER_HPP_ -#define BASEMONSTER_HPP_ +#pragma once #include "entity.hpp" @@ -41,5 +40,3 @@ protected: std::string handle; std::string avatar; }; - -#endif \ No newline at end of file diff --git a/client/entities/entity.hpp b/client/entities/entity.hpp index 77b5c1c..7315525 100644 --- a/client/entities/entity.hpp +++ b/client/entities/entity.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ENTITY_HPP_ -#define ENTITY_HPP_ +#pragma once #include "bounding_box.hpp" #include "sprite_sheet.hpp" @@ -52,5 +51,3 @@ protected: Vector2 motion; BoundingBox bounds; }; - -#endif \ No newline at end of file diff --git a/client/entities/local_character.hpp b/client/entities/local_character.hpp index a462ddc..af7f5fa 100644 --- a/client/entities/local_character.hpp +++ b/client/entities/local_character.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef LOCALCHARACTER_HPP_ -#define LOCALCHARACTER_HPP_ +#pragma once #include "base_character.hpp" #include "bounding_box.hpp" @@ -38,5 +37,3 @@ public: private: //NOTE: NO MEMBERS }; - -#endif \ No newline at end of file diff --git a/client/gameplay_scenes/world.hpp b/client/gameplay_scenes/world.hpp index a2af0a2..ff664ec 100644 --- a/client/gameplay_scenes/world.hpp +++ b/client/gameplay_scenes/world.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef INWORLD_HPP_ -#define INWORLD_HPP_ +#pragma once //maps #include "region_pager_base.hpp" @@ -166,5 +165,3 @@ protected: ConfigUtility& config = ConfigUtility::GetSingleton(); UDPNetworkUtility& network = UDPNetworkUtility::GetSingleton(); }; - -#endif diff --git a/client/menu_scenes/disconnected_screen.hpp b/client/menu_scenes/disconnected_screen.hpp index a735289..d2b9c56 100644 --- a/client/menu_scenes/disconnected_screen.hpp +++ b/client/menu_scenes/disconnected_screen.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef DISCONNECTEDSCREEN_HPP_ -#define DISCONNECTEDSCREEN_HPP_ +#pragma once //graphics #include "image.hpp" @@ -62,5 +61,3 @@ protected: //auto return std::chrono::steady_clock::time_point startTick; }; - -#endif diff --git a/client/menu_scenes/lobby_menu.hpp b/client/menu_scenes/lobby_menu.hpp index 067af8c..875ff94 100644 --- a/client/menu_scenes/lobby_menu.hpp +++ b/client/menu_scenes/lobby_menu.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef LOBBYMENU_HPP_ -#define LOBBYMENU_HPP_ +#pragma once //graphics & ui #include "image.hpp" @@ -101,5 +100,3 @@ protected: BoundingBox listBox; ServerInformation* selection = nullptr; }; - -#endif diff --git a/client/menu_scenes/main_menu.hpp b/client/menu_scenes/main_menu.hpp index d3e7f74..1ca02b3 100644 --- a/client/menu_scenes/main_menu.hpp +++ b/client/menu_scenes/main_menu.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef MAINMENU_HPP_ -#define MAINMENU_HPP_ +#pragma once #include "base_scene.hpp" @@ -55,5 +54,3 @@ protected: Button optionsButton; Button quitButton; }; - -#endif diff --git a/client/menu_scenes/options_menu.hpp b/client/menu_scenes/options_menu.hpp index a828627..a260c09 100644 --- a/client/menu_scenes/options_menu.hpp +++ b/client/menu_scenes/options_menu.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef OPTIONSMENU_HPP_ -#define OPTIONSMENU_HPP_ +#pragma once #include "base_scene.hpp" @@ -54,5 +53,3 @@ protected: RasterFont font; Button backButton; }; - -#endif diff --git a/client/menu_scenes/splash_screen.hpp b/client/menu_scenes/splash_screen.hpp index a8bec1b..9e8de37 100644 --- a/client/menu_scenes/splash_screen.hpp +++ b/client/menu_scenes/splash_screen.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SPLASHSCREEN_HPP_ -#define SPLASHSCREEN_HPP_ +#pragma once #include "base_scene.hpp" @@ -43,5 +42,3 @@ protected: std::chrono::steady_clock::time_point startTick; Image logo; }; - -#endif diff --git a/client/scene_list.hpp b/client/scene_list.hpp index 2db5145..42990ae 100644 --- a/client/scene_list.hpp +++ b/client/scene_list.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SCENELIST_HPP_ -#define SCENELIST_HPP_ +#pragma once enum class SceneList { //these are reserved @@ -36,5 +35,3 @@ enum class SceneList { WORLD, DISCONNECTEDSCREEN, }; - -#endif diff --git a/common/debugging/timer.hpp b/common/debugging/timer.hpp index 847f585..d7e97f3 100644 --- a/common/debugging/timer.hpp +++ b/common/debugging/timer.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TIMER_HPP_ -#define TIMER_HPP_ +#pragma once #include #include @@ -50,5 +49,3 @@ private: }; std::ostream& operator<<(std::ostream& os, Timer& t); - -#endif diff --git a/common/gameplay/character_defines.hpp b/common/gameplay/character_defines.hpp index 7b0d7d6..a975a3e 100644 --- a/common/gameplay/character_defines.hpp +++ b/common/gameplay/character_defines.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CHARACTERDEFINES_HPP_ -#define CHARACTERDEFINES_HPP_ +#pragma once #include @@ -38,5 +37,3 @@ constexpr int CHARACTER_BOUNDS_HEIGHT = 32; //the character's sprite format constexpr int CHARACTER_CELLS_X = 4; constexpr int CHARACTER_CELLS_Y = 4; - -#endif diff --git a/common/graphics/image.hpp b/common/graphics/image.hpp index 709490d..324ae59 100644 --- a/common/graphics/image.hpp +++ b/common/graphics/image.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef IMAGE_HPP_ -#define IMAGE_HPP_ +#pragma once #include "SDL/SDL.h" #include @@ -69,5 +68,3 @@ protected: SDL_Rect clip = {0, 0, 0, 0}; bool local = false; }; - -#endif diff --git a/common/graphics/sprite_sheet.hpp b/common/graphics/sprite_sheet.hpp index ea28a86..2eb3238 100644 --- a/common/graphics/sprite_sheet.hpp +++ b/common/graphics/sprite_sheet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SPRITESHEET_HPP_ -#define SPRITESHEET_HPP_ +#pragma once #include "image.hpp" @@ -62,5 +61,3 @@ private: Uint16 xIndex = 0, yIndex = 0; //current cell being drawn double delay = 0.0, tick = 0.0; }; - -#endif diff --git a/common/graphics/tile_sheet.hpp b/common/graphics/tile_sheet.hpp index 6ad94ea..8ac142f 100644 --- a/common/graphics/tile_sheet.hpp +++ b/common/graphics/tile_sheet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TILESHEET_HPP_ -#define TILESHEET_HPP_ +#pragma once #include "region.hpp" @@ -50,5 +49,3 @@ private: Image image; int xCount = 0, yCount = 0; }; - -#endif diff --git a/common/map/region.hpp b/common/map/region.hpp index fd8c461..68511be 100644 --- a/common/map/region.hpp +++ b/common/map/region.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef REGION_HPP_ -#define REGION_HPP_ +#pragma once #include @@ -59,5 +58,3 @@ private: type_t tiles[REGION_WIDTH][REGION_HEIGHT][REGION_DEPTH]; std::bitset solid; }; - -#endif diff --git a/common/map/region_api.hpp b/common/map/region_api.hpp index 4529f6e..e855bcb 100644 --- a/common/map/region_api.hpp +++ b/common/map/region_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef REGIONAPI_HPP_ -#define REGIONAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_REGION_API "region" LUAMOD_API int openRegionAPI(lua_State* L); - -#endif diff --git a/common/map/region_pager_api.hpp b/common/map/region_pager_api.hpp index ed36740..965b400 100644 --- a/common/map/region_pager_api.hpp +++ b/common/map/region_pager_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef REGIONPAGERAPI_HPP_ -#define REGIONPAGERAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_REGION_PAGER_API "region_pager" LUAMOD_API int openRegionPagerAPI(lua_State* L); - -#endif diff --git a/common/map/region_pager_base.hpp b/common/map/region_pager_base.hpp index cdafa3f..a53083d 100644 --- a/common/map/region_pager_base.hpp +++ b/common/map/region_pager_base.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef REGIONPAGERBASE_HPP_ -#define REGIONPAGERBASE_HPP_ +#pragma once #include "region.hpp" @@ -57,5 +56,3 @@ public: protected: std::list regionList; }; - -#endif diff --git a/common/map/region_pager_lua.hpp b/common/map/region_pager_lua.hpp index ea4e76b..0b64b0a 100644 --- a/common/map/region_pager_lua.hpp +++ b/common/map/region_pager_lua.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef REGIONPAGERLUA_HPP_ -#define REGIONPAGERLUA_HPP_ +#pragma once #include "region_pager_base.hpp" @@ -65,5 +64,3 @@ protected: int createRef = LUA_NOREF; int unloadRef = LUA_NOREF; }; - -#endif diff --git a/common/network/packet_types/character_packet.hpp b/common/network/packet_types/character_packet.hpp index a791bf9..fb3b0bb 100644 --- a/common/network/packet_types/character_packet.hpp +++ b/common/network/packet_types/character_packet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CHARACTERPACKET_HPP_ -#define CHARACTERPACKET_HPP_ +#pragma once #include "serial_packet_base.hpp" @@ -45,5 +44,3 @@ struct CharacterPacket : SerialPacketBase { void serializeCharacter(void* buffer, CharacterPacket* packet); void deserializeCharacter(void* buffer, CharacterPacket* packet); - -#endif \ No newline at end of file diff --git a/common/network/packet_types/client_packet.hpp b/common/network/packet_types/client_packet.hpp index 0195f58..ec5ea5a 100644 --- a/common/network/packet_types/client_packet.hpp +++ b/common/network/packet_types/client_packet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CLIENTPACKET_HPP_ -#define CLIENTPACKET_HPP_ +#pragma once #include "serial_packet_base.hpp" @@ -33,5 +32,3 @@ struct ClientPacket : SerialPacketBase { void serializeClient(void* buffer, ClientPacket* packet); void deserializeClient(void* buffer, ClientPacket* packet); - -#endif \ No newline at end of file diff --git a/common/network/packet_types/monster_packet.hpp b/common/network/packet_types/monster_packet.hpp index 1dfae0c..3a4cc37 100644 --- a/common/network/packet_types/monster_packet.hpp +++ b/common/network/packet_types/monster_packet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef MONSTERPACKET_HPP_ -#define MONSTERPACKET_HPP_ +#pragma once #include "serial_packet_base.hpp" @@ -42,5 +41,3 @@ struct MonsterPacket : SerialPacketBase { void serializeMonster(void* buffer, MonsterPacket* packet); void deserializeMonster(void* buffer, MonsterPacket* packet); - -#endif \ No newline at end of file diff --git a/common/network/packet_types/region_packet.hpp b/common/network/packet_types/region_packet.hpp index 3020262..01588c7 100644 --- a/common/network/packet_types/region_packet.hpp +++ b/common/network/packet_types/region_packet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef REGIONPACKET_HPP_ -#define REGIONPACKET_HPP_ +#pragma once #include "serial_packet_base.hpp" @@ -44,5 +43,3 @@ struct RegionPacket : SerialPacketBase { void serializeRegion(void* buffer, RegionPacket* packet); void deserializeRegion(void* buffer, RegionPacket* packet); - -#endif \ No newline at end of file diff --git a/common/network/packet_types/serial_packet_base.hpp b/common/network/packet_types/serial_packet_base.hpp index 9fc7e8f..22ff75b 100644 --- a/common/network/packet_types/serial_packet_base.hpp +++ b/common/network/packet_types/serial_packet_base.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERIALPACKETBASE_HPP_ -#define SERIALPACKETBASE_HPP_ +#pragma once #include "serial_packet_type.hpp" @@ -35,5 +34,3 @@ struct SerialPacketBase { virtual ~SerialPacketBase() {}; }; - -#endif diff --git a/common/network/packet_types/server_packet.hpp b/common/network/packet_types/server_packet.hpp index 169946e..6c6b1b5 100644 --- a/common/network/packet_types/server_packet.hpp +++ b/common/network/packet_types/server_packet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERVERPACKET_HPP_ -#define SERVERPACKET_HPP_ +#pragma once #include "serial_packet_base.hpp" @@ -33,5 +32,3 @@ struct ServerPacket : SerialPacketBase { void serializeServer(void* buffer, ServerPacket* packet); void deserializeServer(void* buffer, ServerPacket* packet); - -#endif \ No newline at end of file diff --git a/common/network/packet_types/text_packet.hpp b/common/network/packet_types/text_packet.hpp index 9b9ae4b..434ee86 100644 --- a/common/network/packet_types/text_packet.hpp +++ b/common/network/packet_types/text_packet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TEXTPACKET_HPP_ -#define TEXTPACKET_HPP_ +#pragma once #include "serial_packet_base.hpp" @@ -36,5 +35,3 @@ struct TextPacket : SerialPacketBase { void serializeText(void* buffer, TextPacket* packet); void deserializeText(void* buffer, TextPacket* packet); - -#endif diff --git a/common/network/serial_packet.hpp b/common/network/serial_packet.hpp index dc6083a..54a0ffd 100644 --- a/common/network/serial_packet.hpp +++ b/common/network/serial_packet.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERIALPACKET_HPP_ -#define SERIALPACKET_HPP_ +#pragma once #include "serial_packet_base.hpp" #include "character_packet.hpp" @@ -62,5 +61,3 @@ constexpr int PACKET_BUFFER_SIZE = REGION_METADATA_FOOTPRINT + REGION_TILE_FOOTPRINT + REGION_SOLID_FOOTPRINT; - -#endif diff --git a/common/network/serial_packet_type.hpp b/common/network/serial_packet_type.hpp index 062fa05..349d964 100644 --- a/common/network/serial_packet_type.hpp +++ b/common/network/serial_packet_type.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERIALPACKETTYPE_HPP_ -#define SERIALPACKETTYPE_HPP_ +#pragma once /* DOCS: The headers indicate what packet type is used for each message * different messages under the same header will carry different amounts of @@ -183,5 +182,3 @@ enum class SerialPacketType { LAST }; - -#endif \ No newline at end of file diff --git a/common/network/serial_utility.hpp b/common/network/serial_utility.hpp index 0d3e9c0..125379d 100644 --- a/common/network/serial_utility.hpp +++ b/common/network/serial_utility.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERIALIZEUTILITY_HPP_ -#define SERIALIZEUTILITY_HPP_ +#pragma once #include "serial_packet_base.hpp" @@ -33,5 +32,3 @@ void deserialCopy(void** buffer, void* data, int size); //primary functions void serializePacket(void* buffer, SerialPacketBase* packet); void deserializePacket(void* buffer, SerialPacketBase* packet); - -#endif diff --git a/common/network/udp_network_utility.hpp b/common/network/udp_network_utility.hpp index a4452ae..d770244 100644 --- a/common/network/udp_network_utility.hpp +++ b/common/network/udp_network_utility.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef UDPNETWORKUTILITY_HPP_ -#define UDPNETWORKUTILITY_HPP_ +#pragma once //common #include "serial_packet_base.hpp" @@ -73,5 +72,3 @@ private: UDPsocket socket = nullptr; UDPpacket* packet = nullptr; }; - -#endif diff --git a/common/ui/button.hpp b/common/ui/button.hpp index b1d6ff1..4b93520 100644 --- a/common/ui/button.hpp +++ b/common/ui/button.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef BUTTON_HPP_ -#define BUTTON_HPP_ +#pragma once #include "image.hpp" #include "raster_font.hpp" @@ -90,5 +89,3 @@ private: State state = State::NORMAL; std::string text; }; - -#endif diff --git a/common/ui/menu_bar.hpp b/common/ui/menu_bar.hpp index ddbb250..351259b 100644 --- a/common/ui/menu_bar.hpp +++ b/common/ui/menu_bar.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef MENUBAR_HPP_ -#define MENUBAR_HPP_ +#pragma once #include "image.hpp" #include "raster_font.hpp" @@ -88,5 +87,3 @@ private: friend class MenuBar; }; - -#endif diff --git a/common/ui/raster_font.hpp b/common/ui/raster_font.hpp index 25fa39a..9000921 100644 --- a/common/ui/raster_font.hpp +++ b/common/ui/raster_font.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef RASTERFONT_HPP_ -#define RASTERFONT_HPP_ +#pragma once #include "image.hpp" @@ -50,5 +49,3 @@ public: private: Image image; }; - -#endif diff --git a/common/utilities/bounding_box.hpp b/common/utilities/bounding_box.hpp index baf9917..eba974d 100644 --- a/common/utilities/bounding_box.hpp +++ b/common/utilities/bounding_box.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef BOUNDINGBOX_HPP_ -#define BOUNDINGBOX_HPP_ +#pragma once #include #include @@ -74,5 +73,3 @@ inline BoundingBox operator+(BoundingBox b, Vector2 v) { inline BoundingBox operator+(Vector2 v, BoundingBox b) { return b + v; } - -#endif diff --git a/common/utilities/config_utility.hpp b/common/utilities/config_utility.hpp index a63ed17..cc4f2ea 100644 --- a/common/utilities/config_utility.hpp +++ b/common/utilities/config_utility.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CONFIGUTILITY_HPP_ -#define CONFIGUTILITY_HPP_ +#pragma once #include "singleton.hpp" @@ -51,5 +50,3 @@ private: table_t configMap; }; - -#endif diff --git a/common/utilities/frame_rate.hpp b/common/utilities/frame_rate.hpp index e9899ac..3a52c2f 100644 --- a/common/utilities/frame_rate.hpp +++ b/common/utilities/frame_rate.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef FRAMERATE_HPP_ -#define FRAMERATE_HPP_ +#pragma once #include @@ -44,5 +43,3 @@ private: int lastFrameRate = 0; Clock::time_point tick = Clock::now(); }; - -#endif diff --git a/common/utilities/ip_operators.hpp b/common/utilities/ip_operators.hpp index eeef881..5e3c208 100644 --- a/common/utilities/ip_operators.hpp +++ b/common/utilities/ip_operators.hpp @@ -19,13 +19,10 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef IPOPERATORS_HPP_ -#define IPOPERATORS_HPP_ +#pragma once #include "SDL_net.h" //these should've come standard bool operator==(IPaddress lhs, IPaddress rhs); bool operator!=(IPaddress lhs, IPaddress rhs); - -#endif \ No newline at end of file diff --git a/common/utilities/singleton.hpp b/common/utilities/singleton.hpp index ee9fbb0..cba191a 100644 --- a/common/utilities/singleton.hpp +++ b/common/utilities/singleton.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SINGLETON_HPP_ -#define SINGLETON_HPP_ +#pragma once #include @@ -59,5 +58,3 @@ private: template T* Singleton::ptr = nullptr; - -#endif \ No newline at end of file diff --git a/common/utilities/vector2.hpp b/common/utilities/vector2.hpp index 00f4a06..4441c3e 100644 --- a/common/utilities/vector2.hpp +++ b/common/utilities/vector2.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef VECTOR2_HPP_ -#define VECTOR2_HPP_ +#pragma once #include #include @@ -110,5 +109,3 @@ public: //This is explicitly a POD static_assert(std::is_pod::value, "Vector2 is not a POD"); - -#endif diff --git a/server/accounts/account_data.hpp b/server/accounts/account_data.hpp index 97df753..2feecd8 100644 --- a/server/accounts/account_data.hpp +++ b/server/accounts/account_data.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ACCOUNTDATA_HPP_ -#define ACCOUNTDATA_HPP_ +#pragma once #include @@ -55,5 +54,3 @@ private: bool mod = false; bool admin = false; }; - -#endif diff --git a/server/accounts/account_manager.hpp b/server/accounts/account_manager.hpp index 5481d13..9a3ca45 100644 --- a/server/accounts/account_manager.hpp +++ b/server/accounts/account_manager.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ACCOUNTMANAGER_HPP_ -#define ACCOUNTMANAGER_HPP_ +#pragma once #include "account_data.hpp" #include "singleton.hpp" @@ -61,5 +60,3 @@ private: std::map elementMap; sqlite3* database = nullptr; }; - -#endif diff --git a/server/characters/character_api.hpp b/server/characters/character_api.hpp index a7fe161..c8534e7 100644 --- a/server/characters/character_api.hpp +++ b/server/characters/character_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CHARACTERAPI_HPP_ -#define CHARACTERAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_CHARACTER_API "character" LUAMOD_API int openCharacterAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/characters/character_data.hpp b/server/characters/character_data.hpp index c61a489..ba10705 100644 --- a/server/characters/character_data.hpp +++ b/server/characters/character_data.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CHARACTERDATA_HPP_ -#define CHARACTERDATA_HPP_ +#pragma once //components #include "character_defines.hpp" @@ -47,5 +46,3 @@ private: std::string handle; std::string avatar; }; - -#endif diff --git a/server/characters/character_manager.hpp b/server/characters/character_manager.hpp index 48cc54f..2d1f3e4 100644 --- a/server/characters/character_manager.hpp +++ b/server/characters/character_manager.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CHARACTERMANAGER_HPP_ -#define CHARACTERMANAGER_HPP_ +#pragma once #include "character_data.hpp" #include "singleton.hpp" @@ -66,5 +65,3 @@ private: std::map elementMap; sqlite3* database = nullptr; }; - -#endif diff --git a/server/characters/character_manager_api.hpp b/server/characters/character_manager_api.hpp index 7d643ef..166251e 100644 --- a/server/characters/character_manager_api.hpp +++ b/server/characters/character_manager_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CHARACTERMANAGERAPI_HPP_ -#define CHARACTERMANAGERAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_CHARACTER_MANAGER_API "character_manager" LUAMOD_API int openCharacterManagerAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/clients/client_data.hpp b/server/clients/client_data.hpp index fe7482e..bcf7cc8 100644 --- a/server/clients/client_data.hpp +++ b/server/clients/client_data.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CLIENTDATA_HPP_ -#define CLIENTDATA_HPP_ +#pragma once #include "SDL_net.h" @@ -49,5 +48,3 @@ private: Clock::time_point lastBeat = Clock::now(); int attemptedBeats = 0; }; - -#endif diff --git a/server/clients/client_manager.hpp b/server/clients/client_manager.hpp index 94af3c5..7a7b930 100644 --- a/server/clients/client_manager.hpp +++ b/server/clients/client_manager.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef CLIENTMANAGER_HPP_ -#define CLIENTMANAGER_HPP_ +#pragma once #include "client_data.hpp" #include "server_packet.hpp" @@ -61,5 +60,3 @@ private: std::map elementMap; int counter = 0; }; - -#endif \ No newline at end of file diff --git a/server/entities/entity.hpp b/server/entities/entity.hpp index e7e9250..8ed7889 100644 --- a/server/entities/entity.hpp +++ b/server/entities/entity.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ENTITY_HPP_ -#define ENTITY_HPP_ +#pragma once #include "bounding_box.hpp" #include "vector2.hpp" @@ -55,5 +54,3 @@ protected: BoundingBox bounds = {0, 0, 0, 0}; const char* type; }; - -#endif \ No newline at end of file diff --git a/server/entities/entity_api.hpp b/server/entities/entity_api.hpp index c08b5a1..cfd5dec 100644 --- a/server/entities/entity_api.hpp +++ b/server/entities/entity_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ENTITYAPI_HPP_ -#define ENTITYAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_ENTITY_API "entity" LUAMOD_API int openEntityAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/monsters/monster_api.hpp b/server/monsters/monster_api.hpp index e10c4a5..73d535d 100644 --- a/server/monsters/monster_api.hpp +++ b/server/monsters/monster_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef MONSTERAPI_HPP_ -#define MONSTERAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_MONSTER_API "monster" LUAMOD_API int openMonsterAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/monsters/monster_data.hpp b/server/monsters/monster_data.hpp index 45fb3dd..aac2d03 100644 --- a/server/monsters/monster_data.hpp +++ b/server/monsters/monster_data.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef MONSTERDATA_HPP_ -#define MONSTERDATA_HPP_ +#pragma once #include "entity.hpp" @@ -56,5 +55,3 @@ private: std::string avatar; int scriptRef = LUA_NOREF; }; - -#endif \ No newline at end of file diff --git a/server/monsters/monster_manager.hpp b/server/monsters/monster_manager.hpp index 7ab1dfd..76b8ffa 100644 --- a/server/monsters/monster_manager.hpp +++ b/server/monsters/monster_manager.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef MONSTERMANAGER_HPP_ -#define MONSTERMANAGER_HPP_ +#pragma once #include "monster_data.hpp" @@ -61,5 +60,3 @@ private: lua_State* lua = nullptr; sqlite3* database = nullptr; }; - -#endif \ No newline at end of file diff --git a/server/monsters/monster_manager_api.hpp b/server/monsters/monster_manager_api.hpp index cc1b748..218246c 100644 --- a/server/monsters/monster_manager_api.hpp +++ b/server/monsters/monster_manager_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef MONSTERMANAGERAPI_HPP_ -#define MONSTERMANAGERAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_MONSTER_MANAGER_API "monster_manager" LUAMOD_API int openMonsterManagerAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/rooms/room_api.hpp b/server/rooms/room_api.hpp index 8e99d33..b3af811 100644 --- a/server/rooms/room_api.hpp +++ b/server/rooms/room_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ROOMAPI_HPP_ -#define ROOMAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_ROOM_API "room" LUAMOD_API int openRoomAPI(lua_State* L); - -#endif diff --git a/server/rooms/room_data.hpp b/server/rooms/room_data.hpp index ac4331f..7cd11b2 100644 --- a/server/rooms/room_data.hpp +++ b/server/rooms/room_data.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ROOMDATA_HPP_ -#define ROOMDATA_HPP_ +#pragma once #include "character_data.hpp" #include "region_pager_lua.hpp" @@ -78,5 +77,3 @@ private: //hooks int tickRef = LUA_NOREF; }; - -#endif diff --git a/server/rooms/room_manager.hpp b/server/rooms/room_manager.hpp index 90e7a49..af95d56 100644 --- a/server/rooms/room_manager.hpp +++ b/server/rooms/room_manager.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ROOMMANAGER_HPP_ -#define ROOMMANAGER_HPP_ +#pragma once #include "character_data.hpp" #include "room_data.hpp" @@ -80,5 +79,3 @@ private: int createRef = LUA_NOREF; int unloadRef = LUA_NOREF; }; - -#endif diff --git a/server/rooms/room_manager_api.hpp b/server/rooms/room_manager_api.hpp index 645506c..0606d83 100644 --- a/server/rooms/room_manager_api.hpp +++ b/server/rooms/room_manager_api.hpp @@ -19,12 +19,8 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef ROOMMANAGERAPI_HPP_ -#define ROOMMANAGERAPI_HPP_ - +#pragma once #include "lua.hpp" #define TORTUGA_ROOM_MANAGER_API "room_manager" LUAMOD_API int openRoomManagerAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/server_application.hpp b/server/server_application.hpp index b3effbf..29ed8ff 100644 --- a/server/server_application.hpp +++ b/server/server_application.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERVERAPPLICATION_HPP_ -#define SERVERAPPLICATION_HPP_ +#pragma once //managers #include "account_manager.hpp" @@ -128,5 +127,3 @@ private: //misc bool running = true; }; - -#endif diff --git a/server/server_utilities/network_api.hpp b/server/server_utilities/network_api.hpp index 3f6ec7d..62d8381 100644 --- a/server/server_utilities/network_api.hpp +++ b/server/server_utilities/network_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef NETWORKAPI_HPP_ -#define NETWORKAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_NETWORK_API "network" LUAMOD_API int openNetworkAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/server_utilities/server_utilities.hpp b/server/server_utilities/server_utilities.hpp index de1f123..64035b7 100644 --- a/server/server_utilities/server_utilities.hpp +++ b/server/server_utilities/server_utilities.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERVERUTILITIES_HPP_ -#define SERVERUTILITIES_HPP_ +#pragma once #include "character_data.hpp" #include "serial_packet.hpp" @@ -37,5 +36,3 @@ void copyCharacterToPacket(CharacterPacket* const packet, int characterIndex); void copyCharacterToPacket(CharacterPacket* const packet, CharacterData* const characterData, int characterIndex); void pumpAndChangeRooms(int characterIndex, int newRoomIndex); void pumpAndChangeRooms(CharacterData* const characterData, int newRoomIndex, int characterIndex); - -#endif \ No newline at end of file diff --git a/server/server_utilities/sql_tools.hpp b/server/server_utilities/sql_tools.hpp index ee13b08..838bbba 100644 --- a/server/server_utilities/sql_tools.hpp +++ b/server/server_utilities/sql_tools.hpp @@ -19,13 +19,10 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SERVERUTILITY_HPP_ -#define SERVERUTILITY_HPP_ +#pragma once #include "sqlite3.h" #include int runSQLScript(sqlite3* db, std::string fname, int (*callback)(void*,int,char**,char**) = nullptr, void* argPtr = nullptr); - -#endif diff --git a/server/triggers/trigger_api.hpp b/server/triggers/trigger_api.hpp index 171bd04..12f3e85 100644 --- a/server/triggers/trigger_api.hpp +++ b/server/triggers/trigger_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TRIGGERAPI_HPP_ -#define TRIGGERAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_TRIGGER_API "trigger" LUAMOD_API int openTriggerAPI(lua_State* L); - -#endif \ No newline at end of file diff --git a/server/triggers/trigger_data.hpp b/server/triggers/trigger_data.hpp index 6064285..36e9181 100644 --- a/server/triggers/trigger_data.hpp +++ b/server/triggers/trigger_data.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TRIGGERDATA_HPP_ -#define TRIGGERDATA_HPP_ +#pragma once #include "bounding_box.hpp" #include "entity.hpp" @@ -57,5 +56,3 @@ private: int scriptRef = LUA_NOREF; std::list exclusionList; }; - -#endif \ No newline at end of file diff --git a/server/triggers/trigger_manager.hpp b/server/triggers/trigger_manager.hpp index 9fa541c..067f9ec 100644 --- a/server/triggers/trigger_manager.hpp +++ b/server/triggers/trigger_manager.hpp @@ -19,8 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TRIGGERMANAGER_HPP_ -#define TRIGGERMANAGER_HPP_ +#pragma once #include "bounding_box.hpp" #include "vector2.hpp" @@ -60,5 +59,3 @@ private: lua_State* lua = nullptr; int counter = 0; }; - -#endif \ No newline at end of file diff --git a/server/triggers/trigger_manager_api.hpp b/server/triggers/trigger_manager_api.hpp index fd0ca87..2350b60 100644 --- a/server/triggers/trigger_manager_api.hpp +++ b/server/triggers/trigger_manager_api.hpp @@ -19,12 +19,9 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef TRIGGERMANAGERAPI_HPP_ -#define TRIGGERMANAGERAPI_HPP_ +#pragma once #include "lua.hpp" #define TORTUGA_TRIGGER_MANAGER_API "trigger_manager" LUAMOD_API int openTriggerManagerAPI(lua_State* L); - -#endif \ No newline at end of file