From de5c75d782e009a5e6c0afc7b3bb6e8e2358c8f3 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 10 Aug 2024 01:57:59 +0300 Subject: [PATCH] replace include guards with pragma once --- CMakeLists.txt | 2 +- src/assets/Assets.hpp | 5 +---- src/assets/AssetsLoader.hpp | 5 +---- src/assets/assetload_funcs.hpp | 5 +---- src/audio/AL/ALAudio.hpp | 5 +---- src/audio/AL/alutil.hpp | 5 +---- src/audio/NoAudio.hpp | 5 +---- src/audio/audio.hpp | 5 +---- src/coders/GLSLExtension.hpp | 5 +---- src/coders/binary_json.hpp | 5 +---- src/coders/byte_utils.hpp | 5 +---- src/coders/commons.hpp | 5 +---- src/coders/gzip.hpp | 5 +---- src/coders/imageio.hpp | 5 +---- src/coders/json.hpp | 5 +---- src/coders/obj.hpp | 5 +---- src/coders/ogg.hpp | 5 +---- src/coders/png.hpp | 5 +---- src/coders/rle.hpp | 5 +---- src/coders/toml.hpp | 5 +---- src/coders/wav.hpp | 5 +---- src/coders/xml.hpp | 5 +---- src/constants.hpp | 5 +---- src/content/Content.hpp | 5 +---- src/content/ContentBuilder.hpp | 5 +---- src/content/ContentLUT.hpp | 5 +---- src/content/ContentLoader.hpp | 5 +---- src/content/ContentPack.hpp | 5 +---- src/content/PacksManager.hpp | 5 +---- src/content/content_fwd.hpp | 5 +---- src/core_defs.hpp | 5 +---- src/data/dynamic.hpp | 5 +---- src/data/dynamic_fwd.hpp | 5 +---- src/data/dynamic_util.hpp | 5 +---- src/data/setting.hpp | 5 +---- src/debug/Logger.hpp | 5 +---- src/delegates.hpp | 5 +---- src/engine.hpp | 5 +---- src/files/WorldConverter.hpp | 4 +--- src/files/WorldFiles.hpp | 5 +---- src/files/WorldRegions.hpp | 5 +---- src/files/engine_paths.hpp | 5 +---- src/files/files.hpp | 5 +---- src/files/settings_io.hpp | 5 +---- src/frontend/ContentGfxCache.hpp | 5 +---- src/frontend/LevelFrontend.hpp | 5 +---- src/frontend/UiDocument.hpp | 5 +---- src/frontend/hud.hpp | 5 +---- src/frontend/locale.hpp | 5 +---- src/frontend/menu.hpp | 5 +---- src/frontend/screens/LevelScreen.hpp | 5 +---- src/frontend/screens/MenuScreen.hpp | 6 +----- src/frontend/screens/Screen.hpp | 5 +---- src/graphics/core/Atlas.hpp | 6 ++---- src/graphics/core/Batch2D.hpp | 5 +---- src/graphics/core/Batch3D.hpp | 5 +---- src/graphics/core/Cubemap.hpp | 5 +---- src/graphics/core/DrawContext.hpp | 5 +---- src/graphics/core/Font.hpp | 5 +---- src/graphics/core/Framebuffer.hpp | 5 +---- src/graphics/core/GLTexture.hpp | 5 +---- src/graphics/core/ImageData.hpp | 5 +---- src/graphics/core/LineBatch.hpp | 5 +---- src/graphics/core/Mesh.hpp | 5 +---- src/graphics/core/Model.hpp | 5 +---- src/graphics/core/PostProcessing.hpp | 5 +---- src/graphics/core/Shader.hpp | 5 +---- src/graphics/core/Texture.hpp | 5 +---- src/graphics/core/TextureAnimation.hpp | 5 +---- src/graphics/core/Viewport.hpp | 5 +---- src/graphics/core/commons.hpp | 5 +---- src/graphics/core/gl_util.hpp | 5 +---- src/graphics/render/BlocksPreview.hpp | 5 +---- src/graphics/render/BlocksRenderer.hpp | 5 +---- src/graphics/render/ChunksRenderer.hpp | 5 +---- src/graphics/render/ModelBatch.hpp | 5 +---- src/graphics/render/Skybox.hpp | 5 +---- src/graphics/render/WorldRenderer.hpp | 6 +----- src/graphics/ui/GUI.hpp | 5 +---- src/graphics/ui/elements/Button.hpp | 5 +---- src/graphics/ui/elements/CheckBox.hpp | 5 +---- src/graphics/ui/elements/Container.hpp | 5 +---- src/graphics/ui/elements/Image.hpp | 5 +---- src/graphics/ui/elements/InputBindBox.hpp | 5 +---- src/graphics/ui/elements/InventoryView.hpp | 5 +---- src/graphics/ui/elements/Label.hpp | 5 +---- src/graphics/ui/elements/Menu.hpp | 5 +---- src/graphics/ui/elements/Panel.hpp | 5 +---- src/graphics/ui/elements/Plotter.hpp | 5 +---- src/graphics/ui/elements/TextBox.hpp | 5 +---- src/graphics/ui/elements/TrackBar.hpp | 5 +---- src/graphics/ui/elements/UINode.hpp | 5 +---- src/graphics/ui/elements/commons.hpp | 5 +---- src/graphics/ui/gui_util.hpp | 5 +---- src/graphics/ui/gui_xml.hpp | 5 +---- src/interfaces/Object.hpp | 5 +---- src/interfaces/Serializable.hpp | 5 +---- src/interfaces/Task.hpp | 6 +----- src/items/Inventories.hpp | 4 +--- src/items/Inventory.hpp | 5 +---- src/items/ItemDef.hpp | 5 +---- src/items/ItemStack.hpp | 5 +---- src/lighting/LightSolver.hpp | 5 +---- src/lighting/Lighting.hpp | 6 +----- src/lighting/Lightmap.hpp | 5 +---- src/logic/BlocksController.hpp | 5 +---- src/logic/ChunksController.hpp | 5 +---- src/logic/CommandsInterpreter.hpp | 5 +---- src/logic/EngineController.hpp | 5 +---- src/logic/LevelController.hpp | 5 +---- src/logic/PlayerController.hpp | 5 +---- src/logic/scripting/lua/api_lua.hpp | 5 +---- src/logic/scripting/lua/libentity.hpp | 5 +---- src/logic/scripting/lua/lua_commons.hpp | 7 ++----- src/logic/scripting/lua/lua_custom_types.hpp | 5 +---- src/logic/scripting/lua/lua_engine.hpp | 5 +---- src/logic/scripting/lua/lua_util.hpp | 5 +---- src/logic/scripting/scripting.hpp | 5 +---- src/logic/scripting/scripting_functional.hpp | 5 +---- src/logic/scripting/scripting_hud.hpp | 5 +---- src/maths/FrustumCulling.hpp | 5 +---- src/maths/LMPacker.hpp | 5 +---- src/maths/UVRegion.hpp | 5 +---- src/maths/aabb.hpp | 5 +---- src/maths/fastmaths.hpp | 5 +---- src/maths/rays.hpp | 5 +---- src/maths/util.hpp | 5 +---- src/maths/voxmaths.hpp | 5 +---- src/objects/Entities.hpp | 5 +---- src/objects/EntityDef.hpp | 5 +---- src/objects/Player.hpp | 5 +---- src/objects/rigging.hpp | 5 +---- src/physics/Hitbox.hpp | 5 +---- src/physics/PhysicsSolver.hpp | 5 +---- src/settings.hpp | 5 +---- src/typedefs.hpp | 5 +---- src/util/BufferPool.hpp | 5 +---- src/util/Clock.hpp | 5 +---- src/util/ObjectsKeeper.hpp | 5 +---- src/util/RunnablesList.hpp | 5 +---- src/util/ThreadPool.hpp | 5 +---- src/util/command_line.hpp | 5 +---- src/util/data_io.hpp | 5 +---- src/util/listutil.hpp | 5 +---- src/util/platform.hpp | 5 +---- src/util/stringutil.hpp | 5 +---- src/util/timeutil.hpp | 5 +---- src/voxels/Block.hpp | 5 +---- src/voxels/Chunk.hpp | 5 +---- src/voxels/Chunks.hpp | 5 +---- src/voxels/ChunksStorage.hpp | 5 +---- src/voxels/DefaultWorldGenerator.hpp | 5 +---- src/voxels/FlatWorldGenerator.hpp | 5 +---- src/voxels/VoxelsVolume.hpp | 5 +---- src/voxels/WorldGenerator.hpp | 5 +---- src/voxels/voxel.hpp | 5 +---- src/window/Camera.hpp | 5 +---- src/window/Events.hpp | 5 +---- src/window/Window.hpp | 5 +---- src/window/input.hpp | 5 +---- src/world/Level.hpp | 5 +---- src/world/LevelEvents.hpp | 5 +---- src/world/World.hpp | 5 +---- src/world/WorldGenerators.hpp | 5 +---- 164 files changed, 166 insertions(+), 656 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a726e64..579ee11b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ set(CMAKE_CXX_STANDARD 17) file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp) file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) -add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES}) +add_executable(${PROJECT_NAME} ${SOURCES}) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) if(VOXELENGINE_BUILD_APPDIR) diff --git a/src/assets/Assets.hpp b/src/assets/Assets.hpp index c6af22ed..86d6fb22 100644 --- a/src/assets/Assets.hpp +++ b/src/assets/Assets.hpp @@ -1,5 +1,4 @@ -#ifndef ASSETS_ASSETS_HPP_ -#define ASSETS_ASSETS_HPP_ +#pragma once #include #include @@ -113,5 +112,3 @@ void assetload::assets_setup(const Assets* assets) { } } } - -#endif // ASSETS_ASSETS_HPP_ diff --git a/src/assets/AssetsLoader.hpp b/src/assets/AssetsLoader.hpp index f8b0e7c6..1f30130d 100644 --- a/src/assets/AssetsLoader.hpp +++ b/src/assets/AssetsLoader.hpp @@ -1,5 +1,4 @@ -#ifndef ASSETS_ASSETS_LOADER_HPP_ -#define ASSETS_ASSETS_LOADER_HPP_ +#pragma once #include #include @@ -104,5 +103,3 @@ public: const std::vector& alternatives ); }; - -#endif // ASSETS_ASSETS_LOADER_HPP_ diff --git a/src/assets/assetload_funcs.hpp b/src/assets/assetload_funcs.hpp index 6a88eabc..3348edaa 100644 --- a/src/assets/assetload_funcs.hpp +++ b/src/assets/assetload_funcs.hpp @@ -1,5 +1,4 @@ -#ifndef ASSETS_ASSET_LOADERS_HPP_ -#define ASSETS_ASSET_LOADERS_HPP_ +#pragma once #include #include @@ -64,5 +63,3 @@ namespace assetload { const std::shared_ptr& settings ); } - -#endif // ASSETS_ASSET_LOADERS_HPP_ diff --git a/src/audio/AL/ALAudio.hpp b/src/audio/AL/ALAudio.hpp index c39bfe64..7e0f0c29 100644 --- a/src/audio/AL/ALAudio.hpp +++ b/src/audio/AL/ALAudio.hpp @@ -1,5 +1,4 @@ -#ifndef SRC_AUDIO_AUDIO_HPP_ -#define SRC_AUDIO_AUDIO_HPP_ +#pragma once #include #include @@ -178,5 +177,3 @@ namespace audio { static std::unique_ptr create(); }; } - -#endif // SRC_AUDIO_AUDIO_HPP_ diff --git a/src/audio/AL/alutil.hpp b/src/audio/AL/alutil.hpp index 54323300..bfa70118 100644 --- a/src/audio/AL/alutil.hpp +++ b/src/audio/AL/alutil.hpp @@ -1,5 +1,4 @@ -#ifndef AUDIO_AUDIOUTIL_HPP_ -#define AUDIO_AUDIOUTIL_HPP_ +#pragma once #include #include @@ -83,5 +82,3 @@ namespace AL { } } } - -#endif // AUDIO_AUDIOUTIL_HPP_ diff --git a/src/audio/NoAudio.hpp b/src/audio/NoAudio.hpp index 848e322e..edfc3319 100644 --- a/src/audio/NoAudio.hpp +++ b/src/audio/NoAudio.hpp @@ -1,5 +1,4 @@ -#ifndef AUDIO_NOAUDIO_HPP_ -#define AUDIO_NOAUDIO_HPP_ +#pragma once #include "audio.hpp" @@ -91,5 +90,3 @@ namespace audio { static std::unique_ptr create(); }; } - -#endif // AUDIO_NOAUDIO_HPP_ diff --git a/src/audio/audio.hpp b/src/audio/audio.hpp index 2a827fc0..a37ebeea 100644 --- a/src/audio/audio.hpp +++ b/src/audio/audio.hpp @@ -1,5 +1,4 @@ -#ifndef AUDIO_AUDIO_HPP_ -#define AUDIO_AUDIO_HPP_ +#pragma once #include #include @@ -520,5 +519,3 @@ namespace audio { /// @brief Finalize audio system void close(); }; - -#endif // AUDIO_AUDIO_HPP_ diff --git a/src/coders/GLSLExtension.hpp b/src/coders/GLSLExtension.hpp index fdee2e3e..6187d7d4 100644 --- a/src/coders/GLSLExtension.hpp +++ b/src/coders/GLSLExtension.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_GLSL_EXTESION_HPP_ -#define CODERS_GLSL_EXTESION_HPP_ +#pragma once #include #include @@ -35,5 +34,3 @@ public: bool header = false ); }; - -#endif // CODERS_GLSL_EXTESION_HPP_ diff --git a/src/coders/binary_json.hpp b/src/coders/binary_json.hpp index 12586c76..1a7d9330 100644 --- a/src/coders/binary_json.hpp +++ b/src/coders/binary_json.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_BINARY_JSON_HPP_ -#define CODERS_BINARY_JSON_HPP_ +#pragma once #include #include @@ -34,5 +33,3 @@ namespace json { ); std::shared_ptr from_binary(const ubyte* src, size_t size); } - -#endif // CODERS_BINARY_JSON_HPP_ diff --git a/src/coders/byte_utils.hpp b/src/coders/byte_utils.hpp index f1212541..20c5d150 100644 --- a/src/coders/byte_utils.hpp +++ b/src/coders/byte_utils.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_BYTE_UTILS_HPP_ -#define CODERS_BYTE_UTILS_HPP_ +#pragma once #include #include @@ -79,5 +78,3 @@ public: const ubyte* pointer() const; void skip(size_t n); }; - -#endif // CODERS_BYTE_UTILS_HPP_ diff --git a/src/coders/commons.hpp b/src/coders/commons.hpp index 2714808d..77c8cbf5 100644 --- a/src/coders/commons.hpp +++ b/src/coders/commons.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_COMMONS_HPP_ -#define CODERS_COMMONS_HPP_ +#pragma once #include #include @@ -108,5 +107,3 @@ public: BasicParser(std::string_view file, std::string_view source); }; - -#endif // CODERS_COMMONS_HPP_ diff --git a/src/coders/gzip.hpp b/src/coders/gzip.hpp index c89a258b..f18b1c14 100644 --- a/src/coders/gzip.hpp +++ b/src/coders/gzip.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_GZIP_HPP_ -#define CODERS_GZIP_HPP_ +#pragma once #include @@ -18,5 +17,3 @@ namespace gzip { @param size length of GZIP data */ std::vector decompress(const ubyte* src, size_t size); } - -#endif // CODERS_GZIP_HPP_ diff --git a/src/coders/imageio.hpp b/src/coders/imageio.hpp index c5481bea..24554b3f 100644 --- a/src/coders/imageio.hpp +++ b/src/coders/imageio.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_IMAGEIO_HPP_ -#define CODERS_IMAGEIO_HPP_ +#pragma once #include #include @@ -15,5 +14,3 @@ namespace imageio { std::unique_ptr read(const std::string& filename); void write(const std::string& filename, const ImageData* image); } - -#endif // CODERS_IMAGEIO_HPP_ diff --git a/src/coders/json.hpp b/src/coders/json.hpp index 776cbeac..ef48ac37 100644 --- a/src/coders/json.hpp +++ b/src/coders/json.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_JSON_HPP_ -#define CODERS_JSON_HPP_ +#pragma once #include @@ -19,5 +18,3 @@ namespace json { const dynamic::Value& value, bool nice, const std::string& indent ); } - -#endif // CODERS_JSON_HPP_ diff --git a/src/coders/obj.hpp b/src/coders/obj.hpp index 786414e8..552d0ba6 100644 --- a/src/coders/obj.hpp +++ b/src/coders/obj.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_OBJ_HPP_ -#define CODERS_OBJ_HPP_ +#pragma once #include #include @@ -15,5 +14,3 @@ namespace obj { const std::string_view file, const std::string_view src ); } - -#endif // CODERS_OBJ_HPP_ diff --git a/src/coders/ogg.hpp b/src/coders/ogg.hpp index 29c3da60..67ea2458 100644 --- a/src/coders/ogg.hpp +++ b/src/coders/ogg.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_OGG_HPP_ -#define CODERS_OGG_HPP_ +#pragma once #include @@ -16,5 +15,3 @@ namespace ogg { const std::filesystem::path& file ); } - -#endif // CODERS_OGG_HPP_ diff --git a/src/coders/png.hpp b/src/coders/png.hpp index a092e15b..871c03ad 100644 --- a/src/coders/png.hpp +++ b/src/coders/png.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_PNG_HPP_ -#define CODERS_PNG_HPP_ +#pragma once #include #include @@ -12,5 +11,3 @@ namespace png { void write_image(const std::string& filename, const ImageData* image); std::unique_ptr load_texture(const std::string& filename); } - -#endif // CODERS_PNG_HPP_ diff --git a/src/coders/rle.hpp b/src/coders/rle.hpp index da97adcb..0692cc9a 100644 --- a/src/coders/rle.hpp +++ b/src/coders/rle.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_RLE_HPP_ -#define CODERS_RLE_HPP_ +#pragma once #include "typedefs.hpp" @@ -13,5 +12,3 @@ namespace extrle { size_t encode(const ubyte* src, size_t length, ubyte* dst); size_t decode(const ubyte* src, size_t length, ubyte* dst); } - -#endif // CODERS_RLE_HPP_ diff --git a/src/coders/toml.hpp b/src/coders/toml.hpp index 314767df..669e2279 100644 --- a/src/coders/toml.hpp +++ b/src/coders/toml.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_TOML_HPP_ -#define CODERS_TOML_HPP_ +#pragma once #include @@ -16,5 +15,3 @@ namespace toml { SettingsHandler& handler, std::string_view file, std::string_view source ); } - -#endif // CODERS_TOML_HPP_ diff --git a/src/coders/wav.hpp b/src/coders/wav.hpp index 7ea8bf59..5f5270c2 100644 --- a/src/coders/wav.hpp +++ b/src/coders/wav.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_WAV_HPP_ -#define CODERS_WAV_HPP_ +#pragma once #include @@ -16,5 +15,3 @@ namespace wav { const std::filesystem::path& file ); } - -#endif // CODERS_WAV_HPP_ diff --git a/src/coders/xml.hpp b/src/coders/xml.hpp index 72fdb563..136c60df 100644 --- a/src/coders/xml.hpp +++ b/src/coders/xml.hpp @@ -1,5 +1,4 @@ -#ifndef CODERS_XML_HPP_ -#define CODERS_XML_HPP_ +#pragma once #include #include @@ -144,5 +143,3 @@ namespace xml { const std::string& filename, const std::string& source ); } - -#endif // CODERS_XML_HPP_ diff --git a/src/constants.hpp b/src/constants.hpp index e98d5914..15b3e732 100644 --- a/src/constants.hpp +++ b/src/constants.hpp @@ -1,5 +1,4 @@ -#ifndef CONSTANTS_HPP_ -#define CONSTANTS_HPP_ +#pragma once #include "typedefs.hpp" @@ -52,5 +51,3 @@ inline const std::string LAYOUTS_FOLDER = "layouts"; inline const std::string SOUNDS_FOLDER = "sounds"; inline const std::string MODELS_FOLDER = "models"; inline const std::string SKELETONS_FOLDER = "skeletons"; - -#endif // CONSTANTS_HPP_ diff --git a/src/content/Content.hpp b/src/content/Content.hpp index d06edc98..4178b7d8 100644 --- a/src/content/Content.hpp +++ b/src/content/Content.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_CONTENT_HPP_ -#define CONTENT_CONTENT_HPP_ +#pragma once #include #include @@ -230,5 +229,3 @@ public: const UptrsMap& getPacks() const; const UptrsMap& getSkeletons() const; }; - -#endif // CONTENT_CONTENT_HPP_ diff --git a/src/content/ContentBuilder.hpp b/src/content/ContentBuilder.hpp index b1e03bf1..9207316c 100644 --- a/src/content/ContentBuilder.hpp +++ b/src/content/ContentBuilder.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_CONTENT_BUILDER_HPP_ -#define CONTENT_CONTENT_BUILDER_HPP_ +#pragma once #include #include @@ -71,5 +70,3 @@ public: std::unique_ptr build(); }; - -#endif // CONTENT_CONTENT_BUILDER_HPP_ diff --git a/src/content/ContentLUT.hpp b/src/content/ContentLUT.hpp index 5026d414..972a77cf 100644 --- a/src/content/ContentLUT.hpp +++ b/src/content/ContentLUT.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_CONTENT_LUT_HPP_ -#define CONTENT_CONTENT_LUT_HPP_ +#pragma once #include #include @@ -113,5 +112,3 @@ public: std::vector getMissingContent() const; }; - -#endif // CONTENT_CONTENT_LUT_HPP_ diff --git a/src/content/ContentLoader.hpp b/src/content/ContentLoader.hpp index df3459e0..0673a96d 100644 --- a/src/content/ContentLoader.hpp +++ b/src/content/ContentLoader.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_CONTENT_LOADER_HPP_ -#define CONTENT_CONTENT_LOADER_HPP_ +#pragma once #include #include @@ -64,5 +63,3 @@ public: void fixPackIndices(); void load(); }; - -#endif // CONTENT_CONTENT_LOADER_HPP_ diff --git a/src/content/ContentPack.hpp b/src/content/ContentPack.hpp index 67a54128..70b34472 100644 --- a/src/content/ContentPack.hpp +++ b/src/content/ContentPack.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_CONTENT_PACK_HPP_ -#define CONTENT_CONTENT_PACK_HPP_ +#pragma once #include #include @@ -115,5 +114,3 @@ public: return env; } }; - -#endif // CONTENT_CONTENT_PACK_HPP_ diff --git a/src/content/PacksManager.hpp b/src/content/PacksManager.hpp index f8c584d3..3784bbfb 100644 --- a/src/content/PacksManager.hpp +++ b/src/content/PacksManager.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_PACKS_MANAGER_HPP_ -#define CONTENT_PACKS_MANAGER_HPP_ +#pragma once #include #include @@ -47,5 +46,3 @@ public: const std::vector& packs ); }; - -#endif // CONTENT_PACKS_MANAGER_HPP_ diff --git a/src/content/content_fwd.hpp b/src/content/content_fwd.hpp index 312c5d01..719fbfca 100644 --- a/src/content/content_fwd.hpp +++ b/src/content/content_fwd.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_CONTENT_FWD_HPP_ -#define CONTENT_CONTENT_FWD_HPP_ +#pragma once #include "typedefs.hpp" @@ -12,5 +11,3 @@ enum class ResourceType : size_t { CAMERA, LAST = CAMERA }; inline constexpr auto RESOURCE_TYPES_COUNT = static_cast(ResourceType::LAST) + 1; - -#endif // CONTENT_CONTENT_FWD_HPP_ diff --git a/src/core_defs.hpp b/src/core_defs.hpp index d57435ad..32b2424c 100644 --- a/src/core_defs.hpp +++ b/src/core_defs.hpp @@ -1,5 +1,4 @@ -#ifndef CORE_DEFS_HPP_ -#define CORE_DEFS_HPP_ +#pragma once #include @@ -34,5 +33,3 @@ class ContentBuilder; namespace corecontent { void setup(EnginePaths* paths, ContentBuilder* builder); } - -#endif // CORE_DEFS_HPP_ diff --git a/src/data/dynamic.hpp b/src/data/dynamic.hpp index 5b52064b..65320fbb 100644 --- a/src/data/dynamic.hpp +++ b/src/data/dynamic.hpp @@ -1,5 +1,4 @@ -#ifndef DATA_DYNAMIC_HPP_ -#define DATA_DYNAMIC_HPP_ +#pragma once #include #include @@ -163,5 +162,3 @@ namespace dynamic { std::ostream& operator<<(std::ostream& stream, const dynamic::Value& value); std::ostream& operator<<(std::ostream& stream, const dynamic::Map_sptr& value); std::ostream& operator<<(std::ostream& stream, const dynamic::List_sptr& value); - -#endif // DATA_DYNAMIC_HPP_ diff --git a/src/data/dynamic_fwd.hpp b/src/data/dynamic_fwd.hpp index 351be865..148e244b 100644 --- a/src/data/dynamic_fwd.hpp +++ b/src/data/dynamic_fwd.hpp @@ -1,5 +1,4 @@ -#ifndef DATA_DYNAMIC_FWD_HPP_ -#define DATA_DYNAMIC_FWD_HPP_ +#pragma once #include #include @@ -30,5 +29,3 @@ namespace dynamic { using to_string_func = std::function; } - -#endif // DATA_DYNAMIC_FWD_HPP_ diff --git a/src/data/dynamic_util.hpp b/src/data/dynamic_util.hpp index c7808f70..81ba5be0 100644 --- a/src/data/dynamic_util.hpp +++ b/src/data/dynamic_util.hpp @@ -1,5 +1,4 @@ -#ifndef DATA_DYNAMIC_UTIL_HPP_ -#define DATA_DYNAMIC_UTIL_HPP_ +#pragma once #include @@ -78,5 +77,3 @@ namespace dynamic { } } } - -#endif // DATA_DYNAMIC_UTIL_HPP_ diff --git a/src/data/setting.hpp b/src/data/setting.hpp index 0ec643bd..2053254a 100644 --- a/src/data/setting.hpp +++ b/src/data/setting.hpp @@ -1,5 +1,4 @@ -#ifndef DATA_SETTING_HPP_ -#define DATA_SETTING_HPP_ +#pragma once #include #include @@ -174,5 +173,3 @@ public: virtual std::string toString() const override; }; - -#endif // DATA_SETTING_HPP_ diff --git a/src/debug/Logger.hpp b/src/debug/Logger.hpp index eb5b3c4e..6b931fe0 100644 --- a/src/debug/Logger.hpp +++ b/src/debug/Logger.hpp @@ -1,5 +1,4 @@ -#ifndef DEBUG_LOGGER_HPP_ -#define DEBUG_LOGGER_HPP_ +#pragma once #include #include @@ -63,5 +62,3 @@ namespace debug { } }; } - -#endif // DEBUG_LOGGER_HPP_ diff --git a/src/delegates.hpp b/src/delegates.hpp index fe1c95e6..32492164 100644 --- a/src/delegates.hpp +++ b/src/delegates.hpp @@ -1,5 +1,4 @@ -#ifndef DELEGATES_HPP_ -#define DELEGATES_HPP_ +#pragma once #include #include @@ -21,5 +20,3 @@ using doubleconsumer = std::function; using boolconsumer = std::function; using int_array_consumer = std::function; using wstringchecker = std::function; - -#endif // DELEGATES_HPP_ diff --git a/src/engine.hpp b/src/engine.hpp index de18b3e3..de25c220 100644 --- a/src/engine.hpp +++ b/src/engine.hpp @@ -1,5 +1,4 @@ -#ifndef ENGINE_HPP_ -#define ENGINE_HPP_ +#pragma once #include "delegates.hpp" #include "typedefs.hpp" @@ -148,5 +147,3 @@ public: SettingsHandler& getSettingsHandler(); }; - -#endif // ENGINE_HPP_ diff --git a/src/files/WorldConverter.hpp b/src/files/WorldConverter.hpp index 3a56cf68..20d7c326 100644 --- a/src/files/WorldConverter.hpp +++ b/src/files/WorldConverter.hpp @@ -1,5 +1,4 @@ -#ifndef FILES_WORLD_CONVERTER_HPP_ -#define FILES_WORLD_CONVERTER_HPP_ +#pragma once #include #include @@ -61,4 +60,3 @@ public: ); }; -#endif // FILES_WORLD_CONVERTER_HPP_ diff --git a/src/files/WorldFiles.hpp b/src/files/WorldFiles.hpp index 0a24a3f4..311a5feb 100644 --- a/src/files/WorldFiles.hpp +++ b/src/files/WorldFiles.hpp @@ -1,5 +1,4 @@ -#ifndef FILES_WORLD_FILES_HPP_ -#define FILES_WORLD_FILES_HPP_ +#pragma once #include #include @@ -72,5 +71,3 @@ public: return doWriteLights; } }; - -#endif // FILES_WORLD_FILES_HPP_ diff --git a/src/files/WorldRegions.hpp b/src/files/WorldRegions.hpp index bf838e24..d8f50950 100644 --- a/src/files/WorldRegions.hpp +++ b/src/files/WorldRegions.hpp @@ -1,5 +1,4 @@ -#ifndef FILES_WORLD_REGIONS_HPP_ -#define FILES_WORLD_REGIONS_HPP_ +#pragma once #include #include @@ -213,5 +212,3 @@ public: /// @return false if std::invalid_argument or std::out_of_range occurred static bool parseRegionFilename(const std::string& name, int& x, int& y); }; - -#endif // FILES_WORLD_REGIONS_HPP_ diff --git a/src/files/engine_paths.hpp b/src/files/engine_paths.hpp index 2360cc30..ab966791 100644 --- a/src/files/engine_paths.hpp +++ b/src/files/engine_paths.hpp @@ -1,5 +1,4 @@ -#ifndef FILES_ENGINE_PATHS_HPP_ -#define FILES_ENGINE_PATHS_HPP_ +#pragma once #include #include @@ -68,5 +67,3 @@ private: std::filesystem::path mainRoot; std::vector roots; }; - -#endif // FILES_ENGINE_PATHS_HPP_ diff --git a/src/files/files.hpp b/src/files/files.hpp index 6b784098..abcbdbb4 100644 --- a/src/files/files.hpp +++ b/src/files/files.hpp @@ -1,5 +1,4 @@ -#ifndef FILES_FILES_HPP_ -#define FILES_FILES_HPP_ +#pragma once #include #include @@ -71,5 +70,3 @@ namespace files { std::shared_ptr read_toml(const fs::path& file); std::vector read_list(const fs::path& file); } - -#endif /* FILES_FILES_HPP_ */ diff --git a/src/files/settings_io.hpp b/src/files/settings_io.hpp index dcea564a..00d3eb76 100644 --- a/src/files/settings_io.hpp +++ b/src/files/settings_io.hpp @@ -1,5 +1,4 @@ -#ifndef FILES_SETTINGS_IO_HPP_ -#define FILES_SETTINGS_IO_HPP_ +#pragma once #include #include @@ -30,5 +29,3 @@ public: std::vector
& getSections(); }; - -#endif // FILES_SETTINGS_IO_HPP_ diff --git a/src/frontend/ContentGfxCache.hpp b/src/frontend/ContentGfxCache.hpp index a833430e..8d92d1a3 100644 --- a/src/frontend/ContentGfxCache.hpp +++ b/src/frontend/ContentGfxCache.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_BLOCKS_GFX_CACHE_HPP_ -#define FRONTEND_BLOCKS_GFX_CACHE_HPP_ +#pragma once #include "typedefs.hpp" @@ -23,5 +22,3 @@ public: const Content* getContent() const; }; - -#endif // FRONTEND_BLOCKS_GFX_CACHE_HPP_ diff --git a/src/frontend/LevelFrontend.hpp b/src/frontend/LevelFrontend.hpp index 0a57e7c7..ed149598 100644 --- a/src/frontend/LevelFrontend.hpp +++ b/src/frontend/LevelFrontend.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_LEVEL_FRONTEND_HPP_ -#define FRONTEND_LEVEL_FRONTEND_HPP_ +#pragma once #include @@ -23,5 +22,3 @@ public: ContentGfxCache* getContentGfxCache() const; LevelController* getController() const; }; - -#endif // FRONTEND_LEVEL_FRONTEND_HPP_ diff --git a/src/frontend/UiDocument.hpp b/src/frontend/UiDocument.hpp index 8ddcb67e..dcd2a34e 100644 --- a/src/frontend/UiDocument.hpp +++ b/src/frontend/UiDocument.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_UI_DOCUMENT_HPP_ -#define FRONTEND_UI_DOCUMENT_HPP_ +#pragma once #include "typedefs.hpp" @@ -49,5 +48,3 @@ public: static std::unique_ptr read(const scriptenv& parent_env, const std::string& name, const fs::path& file); static std::shared_ptr readElement(const fs::path& file); }; - -#endif // FRONTEND_UI_DOCUMENT_HPP_ diff --git a/src/frontend/hud.hpp b/src/frontend/hud.hpp index 8375b3bb..26d0d9d3 100644 --- a/src/frontend/hud.hpp +++ b/src/frontend/hud.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_HUD_HPP_ -#define FRONTEND_HUD_HPP_ +#pragma once #include "typedefs.hpp" #include "util/ObjectsKeeper.hpp" @@ -169,5 +168,3 @@ public: std::shared_ptr getBlockInventory(); }; - -#endif // FRONTEND_HUD_HPP_ diff --git a/src/frontend/locale.hpp b/src/frontend/locale.hpp index e2209788..b3e200c9 100644 --- a/src/frontend/locale.hpp +++ b/src/frontend/locale.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_LOCALES_HPP_ -#define FRONTEND_LOCALES_HPP_ +#pragma once #include #include @@ -68,5 +67,3 @@ namespace langs { std::string locale, const std::vector& packs); } - -#endif // FRONTEND_LOCALES_HPP_ diff --git a/src/frontend/menu.hpp b/src/frontend/menu.hpp index 0c0d47d2..f4e70db2 100644 --- a/src/frontend/menu.hpp +++ b/src/frontend/menu.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_MENU_MENU_HPP_ -#define FRONTEND_MENU_MENU_HPP_ +#pragma once #include "data/dynamic.hpp" #include "graphics/ui/elements/Menu.hpp" @@ -29,5 +28,3 @@ namespace menus { bool call(Engine* engine, runnable func); } - -#endif // FRONTEND_MENU_MENU_HPP_ diff --git a/src/frontend/screens/LevelScreen.hpp b/src/frontend/screens/LevelScreen.hpp index 2da4cbec..d2fe1a58 100644 --- a/src/frontend/screens/LevelScreen.hpp +++ b/src/frontend/screens/LevelScreen.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_SCREENS_LEVEL_SCREEN_HPP_ -#define FRONTEND_SCREENS_LEVEL_SCREEN_HPP_ +#pragma once #include "Screen.hpp" @@ -40,5 +39,3 @@ public: LevelController* getLevelController() const; }; - -#endif // FRONTEND_SCREENS_LEVEL_SCREEN_HPP_ diff --git a/src/frontend/screens/MenuScreen.hpp b/src/frontend/screens/MenuScreen.hpp index b8e097ba..fa6de8ba 100644 --- a/src/frontend/screens/MenuScreen.hpp +++ b/src/frontend/screens/MenuScreen.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_SCREENS_MENU_SCREEN_HPP_ -#define FRONTEND_SCREENS_MENU_SCREEN_HPP_ +#pragma once #include "Screen.hpp" @@ -17,6 +16,3 @@ public: void update(float delta) override; void draw(float delta) override; }; - - -#endif // FRONTEND_SCREENS_MENU_SCREEN_HPP_ diff --git a/src/frontend/screens/Screen.hpp b/src/frontend/screens/Screen.hpp index 174c5059..28a49a06 100644 --- a/src/frontend/screens/Screen.hpp +++ b/src/frontend/screens/Screen.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_SCREENS_SCREEN_HPP_ -#define FRONTEND_SCREENS_SCREEN_HPP_ +#pragma once #include "util/ObjectsKeeper.hpp" @@ -18,5 +17,3 @@ public: virtual void draw(float delta) = 0; virtual void onEngineShutdown() {}; }; - -#endif // FRONTEND_SCREENS_SCREEN_HPP_ diff --git a/src/graphics/core/Atlas.hpp b/src/graphics/core/Atlas.hpp index 302bff9a..2e563e8a 100644 --- a/src/graphics/core/Atlas.hpp +++ b/src/graphics/core/Atlas.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_ATLAS_HPP_ -#define GRAPHICS_CORE_ATLAS_HPP_ +#pragma once #include #include @@ -7,6 +6,7 @@ #include #include #include + #include "maths/UVRegion.hpp" #include "typedefs.hpp" @@ -59,5 +59,3 @@ public: /// @param maxResolution max atlas resolution std::unique_ptr build(uint extrusion, bool prepare=true, uint maxResolution=0); }; - -#endif // GRAPHICS_CORE_ATLAS_HPP_ diff --git a/src/graphics/core/Batch2D.hpp b/src/graphics/core/Batch2D.hpp index 975b7e0f..4e38ffe5 100644 --- a/src/graphics/core/Batch2D.hpp +++ b/src/graphics/core/Batch2D.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_BATCH2D_HPP_ -#define GRAPHICS_CORE_BATCH2D_HPP_ +#pragma once #include #include @@ -93,5 +92,3 @@ public: void lineWidth(float width); }; - -#endif // GRAPHICS_CORE_BATCH2D_HPP_ diff --git a/src/graphics/core/Batch3D.hpp b/src/graphics/core/Batch3D.hpp index 1809dac1..f53b0a0c 100644 --- a/src/graphics/core/Batch3D.hpp +++ b/src/graphics/core/Batch3D.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_BATCH3D_HPP_ -#define GRAPHICS_CORE_BATCH3D_HPP_ +#pragma once #include "typedefs.hpp" #include "commons.hpp" @@ -58,5 +57,3 @@ public: void flush() override; void flushPoints(); }; - -#endif // GRAPHICS_CORE_BATCH3D_HPP_ diff --git a/src/graphics/core/Cubemap.hpp b/src/graphics/core/Cubemap.hpp index 7ff5913c..72d29a21 100644 --- a/src/graphics/core/Cubemap.hpp +++ b/src/graphics/core/Cubemap.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_CUBEMAP_HPP_ -#define GRAPHICS_CORE_CUBEMAP_HPP_ +#pragma once #include "GLTexture.hpp" @@ -11,5 +10,3 @@ public: virtual void bind() override; virtual void unbind() override; }; - -#endif // GRAPHICS_CORE_CUBEMAP_HPP_ diff --git a/src/graphics/core/DrawContext.hpp b/src/graphics/core/DrawContext.hpp index 85769c87..9174be1b 100644 --- a/src/graphics/core/DrawContext.hpp +++ b/src/graphics/core/DrawContext.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_GFX_CONTEXT_HPP_ -#define GRAPHICS_CORE_GFX_CONTEXT_HPP_ +#pragma once #include "commons.hpp" #include "Viewport.hpp" @@ -38,5 +37,3 @@ public: void setScissors(glm::vec4 area); void setLineWidth(float width); }; - -#endif // GRAPHICS_CORE_GFX_CONTEXT_HPP_ diff --git a/src/graphics/core/Font.hpp b/src/graphics/core/Font.hpp index 0af6dddb..ecda77a5 100644 --- a/src/graphics/core/Font.hpp +++ b/src/graphics/core/Font.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_FONT_HPP_ -#define GRAPHICS_CORE_FONT_HPP_ +#pragma once #include #include @@ -46,5 +45,3 @@ public: void draw(Batch2D* batch, const std::wstring& text, int x, int y, FontStyle style); void draw(Batch2D* batch, std::wstring_view text, int x, int y, FontStyle style); }; - -#endif // GRAPHICS_CORE_FONT_HPP_ diff --git a/src/graphics/core/Framebuffer.hpp b/src/graphics/core/Framebuffer.hpp index 29b8da84..795ca2c4 100644 --- a/src/graphics/core/Framebuffer.hpp +++ b/src/graphics/core/Framebuffer.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_FRAMEBUFFER_HPP_ -#define GRAPHICS_CORE_FRAMEBUFFER_HPP_ +#pragma once #include "typedefs.hpp" @@ -38,5 +37,3 @@ public: /// @brief Get framebuffer height uint getHeight() const; }; - -#endif // GRAPHICS_CORE_FRAMEBUFFER_HPP_ diff --git a/src/graphics/core/GLTexture.hpp b/src/graphics/core/GLTexture.hpp index 8274c202..10e002e9 100644 --- a/src/graphics/core/GLTexture.hpp +++ b/src/graphics/core/GLTexture.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_GLTEXTURE_HPP_ -#define GRAPHICS_CORE_GLTEXTURE_HPP_ +#pragma once #include "Texture.hpp" @@ -26,5 +25,3 @@ public: static std::unique_ptr from(const ImageData* image); }; - -#endif // GRAPHICS_CORE_GLTEXTURE_HPP_ diff --git a/src/graphics/core/ImageData.hpp b/src/graphics/core/ImageData.hpp index 5c33573d..328ff896 100644 --- a/src/graphics/core/ImageData.hpp +++ b/src/graphics/core/ImageData.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_IMAGE_DATA_HPP_ -#define GRAPHICS_CORE_IMAGE_DATA_HPP_ +#pragma once #include "typedefs.hpp" @@ -48,5 +47,3 @@ public: }; std::unique_ptr add_atlas_margins(ImageData* image, int grid_size); - -#endif // GRAPHICS_CORE_IMAGE_DATA_HPP_ diff --git a/src/graphics/core/LineBatch.hpp b/src/graphics/core/LineBatch.hpp index a31b827d..fe77da60 100644 --- a/src/graphics/core/LineBatch.hpp +++ b/src/graphics/core/LineBatch.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_LINEBATCH_HPP_ -#define GRAPHICS_CORE_LINEBATCH_HPP_ +#pragma once #include #include @@ -34,5 +33,3 @@ public: void flush() override; void lineWidth(float width); }; - -#endif // GRAPHICS_CORE_LINEBATCH_HPP_ diff --git a/src/graphics/core/Mesh.hpp b/src/graphics/core/Mesh.hpp index bd93f219..c94154a6 100644 --- a/src/graphics/core/Mesh.hpp +++ b/src/graphics/core/Mesh.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_MESH_HPP_ -#define GRAPHICS_CORE_MESH_HPP_ +#pragma once #include #include "typedefs.hpp" @@ -39,5 +38,3 @@ public: static int meshesCount; static int drawCalls; }; - -#endif // GRAPHICS_CORE_MESH_HPP_ diff --git a/src/graphics/core/Model.hpp b/src/graphics/core/Model.hpp index 03d00826..786b9ac9 100644 --- a/src/graphics/core/Model.hpp +++ b/src/graphics/core/Model.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_MODEL_HPP_ -#define GRAPHICS_CORE_MODEL_HPP_ +#pragma once #include #include @@ -34,5 +33,3 @@ namespace model { void clean(); }; } - -#endif // GRAPHICS_CORE_MODEL_HPP_ diff --git a/src/graphics/core/PostProcessing.hpp b/src/graphics/core/PostProcessing.hpp index 408839c9..b31a1369 100644 --- a/src/graphics/core/PostProcessing.hpp +++ b/src/graphics/core/PostProcessing.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_POST_PROCESSING_HPP_ -#define GRAPHICS_CORE_POST_PROCESSING_HPP_ +#pragma once #include @@ -37,5 +36,3 @@ public: Framebuffer* getFramebuffer() const; }; - -#endif // GRAPHICS_CORE_POST_PROCESSING_HPP_ diff --git a/src/graphics/core/Shader.hpp b/src/graphics/core/Shader.hpp index ab4446cd..dd399751 100644 --- a/src/graphics/core/Shader.hpp +++ b/src/graphics/core/Shader.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_SHADER_HPP_ -#define GRAPHICS_CORE_SHADER_HPP_ +#pragma once #include "typedefs.hpp" @@ -44,5 +43,3 @@ public: const std::string& fragmentSource ); }; - -#endif // GRAPHICS_SHADER_HPP_ diff --git a/src/graphics/core/Texture.hpp b/src/graphics/core/Texture.hpp index 323dec73..9e16f670 100644 --- a/src/graphics/core/Texture.hpp +++ b/src/graphics/core/Texture.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_TEXTURE_HPP_ -#define GRAPHICS_CORE_TEXTURE_HPP_ +#pragma once #include "typedefs.hpp" #include "maths/UVRegion.hpp" @@ -35,5 +34,3 @@ public: static std::unique_ptr from(const ImageData* image); }; - -#endif // GRAPHICS_CORE_TEXTURE_HPP_ diff --git a/src/graphics/core/TextureAnimation.hpp b/src/graphics/core/TextureAnimation.hpp index 234ca84c..dc93063c 100644 --- a/src/graphics/core/TextureAnimation.hpp +++ b/src/graphics/core/TextureAnimation.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_TEXTURE_ANIMATION_HPP_ -#define GRAPHICS_CORE_TEXTURE_ANIMATION_HPP_ +#pragma once #include "typedefs.hpp" @@ -48,5 +47,3 @@ private: std::vector animations; }; - -#endif // GRAPHICS_CORE_TEXTURE_ANIMATION_HPP_ diff --git a/src/graphics/core/Viewport.hpp b/src/graphics/core/Viewport.hpp index e1574a09..7ec826a1 100644 --- a/src/graphics/core/Viewport.hpp +++ b/src/graphics/core/Viewport.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_VIEWPORT_HPP_ -#define GRAPHICS_CORE_VIEWPORT_HPP_ +#pragma once #include @@ -18,5 +17,3 @@ public: return glm::ivec2(width, height); } }; - -#endif // GRAPHICS_VIEWPORT_HPP_ diff --git a/src/graphics/core/commons.hpp b/src/graphics/core/commons.hpp index e6ccc57f..4d3f376f 100644 --- a/src/graphics/core/commons.hpp +++ b/src/graphics/core/commons.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_COMMONS_HPP_ -#define GRAPHICS_CORE_COMMONS_HPP_ +#pragma once enum class DrawPrimitive { point = 0, @@ -17,5 +16,3 @@ public: virtual void flush() = 0; }; - -#endif // GRAPHICS_CORE_COMMONS_HPP_ diff --git a/src/graphics/core/gl_util.hpp b/src/graphics/core/gl_util.hpp index f95f9f2a..3e34b923 100644 --- a/src/graphics/core/gl_util.hpp +++ b/src/graphics/core/gl_util.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_CORE_GL_UTIL_HPP_ -#define GRAPHICS_CORE_GL_UTIL_HPP_ +#pragma once #include "commons.hpp" #include "ImageData.hpp" @@ -25,5 +24,3 @@ namespace gl { return primitives[static_cast(primitive)]; } } - -#endif // GRAPHICS_CORE_GL_UTIL_HPP_ diff --git a/src/graphics/render/BlocksPreview.hpp b/src/graphics/render/BlocksPreview.hpp index 8cdec60b..3dba931c 100644 --- a/src/graphics/render/BlocksPreview.hpp +++ b/src/graphics/render/BlocksPreview.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_RENDER_BLOCKS_PREVIEW_HPP_ -#define GRAPHICS_RENDER_BLOCKS_PREVIEW_HPP_ +#pragma once #include "typedefs.hpp" @@ -32,5 +31,3 @@ public: const Content* content ); }; - -#endif // GRAPHICS_RENDER_BLOCKS_PREVIEW_HPP_ diff --git a/src/graphics/render/BlocksRenderer.hpp b/src/graphics/render/BlocksRenderer.hpp index 311936e1..ef827091 100644 --- a/src/graphics/render/BlocksRenderer.hpp +++ b/src/graphics/render/BlocksRenderer.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_RENDER_BLOCKS_RENDERER_HPP_ -#define GRAPHICS_RENDER_BLOCKS_RENDERER_HPP_ +#pragma once #include #include @@ -132,5 +131,3 @@ public: std::shared_ptr createMesh(); VoxelsVolume* getVoxelsBuffer() const; }; - -#endif // GRAPHICS_RENDER_BLOCKS_RENDERER_HPP_ diff --git a/src/graphics/render/ChunksRenderer.hpp b/src/graphics/render/ChunksRenderer.hpp index c1e2c721..353877a0 100644 --- a/src/graphics/render/ChunksRenderer.hpp +++ b/src/graphics/render/ChunksRenderer.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_RENDER_CHUNKSRENDERER_HPP_ -#define GRAPHICS_RENDER_CHUNKSRENDERER_HPP_ +#pragma once #include #include @@ -46,5 +45,3 @@ public: void update(); }; - -#endif // GRAPHICS_RENDER_CHUNKSRENDERER_HPP_ diff --git a/src/graphics/render/ModelBatch.hpp b/src/graphics/render/ModelBatch.hpp index 128bcaaa..31dfc292 100644 --- a/src/graphics/render/ModelBatch.hpp +++ b/src/graphics/render/ModelBatch.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_RENDER_MODEL_BATCH_HPP_ -#define GRAPHICS_RENDER_MODEL_BATCH_HPP_ +#pragma once #include "maths/UVRegion.hpp" @@ -90,5 +89,3 @@ public: const texture_names_map* varTextures); void render(); }; - -#endif // GRAPHICS_RENDER_MODEL_BATCH_HPP_ diff --git a/src/graphics/render/Skybox.hpp b/src/graphics/render/Skybox.hpp index be737e1a..01bffab7 100644 --- a/src/graphics/render/Skybox.hpp +++ b/src/graphics/render/Skybox.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_RENDER_SKYBOX_HPP_ -#define GRAPHICS_RENDER_SKYBOX_HPP_ +#pragma once #include #include @@ -54,5 +53,3 @@ public: return ready; } }; - -#endif // GRAPHICS_RENDER_SKYBOX_HPP_ diff --git a/src/graphics/render/WorldRenderer.hpp b/src/graphics/render/WorldRenderer.hpp index 9a199ce6..13bdb185 100644 --- a/src/graphics/render/WorldRenderer.hpp +++ b/src/graphics/render/WorldRenderer.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_RENDER_WORLD_RENDERER_HPP_ -#define GRAPHICS_RENDER_WORLD_RENDERER_HPP_ +#pragma once #include #include @@ -98,6 +97,3 @@ public: bool pause ); }; - - -#endif // GRAPHICS_RENDER_WORLD_RENDERER_HPP_ diff --git a/src/graphics/ui/GUI.hpp b/src/graphics/ui/GUI.hpp index 7910b1af..b2b20bd0 100644 --- a/src/graphics/ui/GUI.hpp +++ b/src/graphics/ui/GUI.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_GUI_GUI_HPP_ -#define FRONTEND_GUI_GUI_HPP_ +#pragma once #include "delegates.hpp" @@ -135,5 +134,3 @@ namespace gui { float getDoubleClickDelay() const; }; } - -#endif // FRONTEND_GUI_GUI_HPP_ diff --git a/src/graphics/ui/elements/Button.hpp b/src/graphics/ui/elements/Button.hpp index bfa84abd..61bfea03 100644 --- a/src/graphics/ui/elements/Button.hpp +++ b/src/graphics/ui/elements/Button.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_BUTTON_HPP_ -#define GRAPHICS_UI_ELEMENTS_BUTTON_HPP_ +#pragma once #include "Panel.hpp" @@ -31,5 +30,3 @@ namespace gui { virtual void refresh() override; }; } - -#endif // GRAPHICS_UI_ELEMENTS_BUTTON_HPP_ diff --git a/src/graphics/ui/elements/CheckBox.hpp b/src/graphics/ui/elements/CheckBox.hpp index 7b546e0d..f4e31f38 100644 --- a/src/graphics/ui/elements/CheckBox.hpp +++ b/src/graphics/ui/elements/CheckBox.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_ -#define GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_ +#pragma once #include @@ -59,5 +58,3 @@ namespace gui { } }; } - -#endif // GRAPHICS_UI_ELEMENTS_CHECKBOX_HPP_ diff --git a/src/graphics/ui/elements/Container.hpp b/src/graphics/ui/elements/Container.hpp index 606c9179..52d2a374 100644 --- a/src/graphics/ui/elements/Container.hpp +++ b/src/graphics/ui/elements/Container.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_ -#define GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_ +#pragma once #include "UINode.hpp" #include "commons.hpp" @@ -38,5 +37,3 @@ namespace gui { const std::vector>& getNodes() const; }; } - -#endif // GRAPHICS_UI_ELEMENTS_CONTAINER_HPP_ diff --git a/src/graphics/ui/elements/Image.hpp b/src/graphics/ui/elements/Image.hpp index 06bab69d..898b5df8 100644 --- a/src/graphics/ui/elements/Image.hpp +++ b/src/graphics/ui/elements/Image.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_IMAGE_HPP_ -#define GRAPHICS_UI_ELEMENTS_IMAGE_HPP_ +#pragma once #include "UINode.hpp" @@ -19,5 +18,3 @@ namespace gui { virtual void setTexture(const std::string& name); }; } - -#endif // GRAPHICS_UI_ELEMENTS_IMAGE_HPP_ diff --git a/src/graphics/ui/elements/InputBindBox.hpp b/src/graphics/ui/elements/InputBindBox.hpp index 768d741a..cd1a074b 100644 --- a/src/graphics/ui/elements/InputBindBox.hpp +++ b/src/graphics/ui/elements/InputBindBox.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_ -#define GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_ +#pragma once #include "Panel.hpp" @@ -21,5 +20,3 @@ namespace gui { virtual bool isFocuskeeper() const override {return true;} }; } - -#endif // GRAPHICS_UI_ELEMENTS_INPUTBINDBOX_HPP_ diff --git a/src/graphics/ui/elements/InventoryView.hpp b/src/graphics/ui/elements/InventoryView.hpp index 8afe7820..1700c168 100644 --- a/src/graphics/ui/elements/InventoryView.hpp +++ b/src/graphics/ui/elements/InventoryView.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_INVENTORY_VIEW_HPP_ -#define FRONTEND_INVENTORY_VIEW_HPP_ +#pragma once #include "UINode.hpp" #include "Container.hpp" @@ -140,5 +139,3 @@ namespace gui { std::shared_ptr build(); }; } - -#endif // FRONTEND_INVENTORY_VIEW_HPP_ diff --git a/src/graphics/ui/elements/Label.hpp b/src/graphics/ui/elements/Label.hpp index 0c3cb8f9..4aca8a7a 100644 --- a/src/graphics/ui/elements/Label.hpp +++ b/src/graphics/ui/elements/Label.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_LABEL_HPP_ -#define GRAPHICS_UI_ELEMENTS_LABEL_HPP_ +#pragma once #include "UINode.hpp" @@ -110,5 +109,3 @@ namespace gui { virtual bool isTextWrapping() const; }; } - -#endif // GRAPHICS_UI_ELEMENTS_LABEL_HPP_ diff --git a/src/graphics/ui/elements/Menu.hpp b/src/graphics/ui/elements/Menu.hpp index 9a7f1859..8f18d2c4 100644 --- a/src/graphics/ui/elements/Menu.hpp +++ b/src/graphics/ui/elements/Menu.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_MENU_HPP_ -#define GRAPHICS_UI_ELEMENTS_MENU_HPP_ +#pragma once #include "Container.hpp" @@ -56,5 +55,3 @@ namespace gui { Page& getCurrent(); }; } - -#endif // GRAPHICS_UI_ELEMENTS_MENU_HPP_ diff --git a/src/graphics/ui/elements/Panel.hpp b/src/graphics/ui/elements/Panel.hpp index 100239cf..0ad69be7 100644 --- a/src/graphics/ui/elements/Panel.hpp +++ b/src/graphics/ui/elements/Panel.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_PANEL_HPP_ -#define GRAPHICS_UI_ELEMENTS_PANEL_HPP_ +#pragma once #include "commons.hpp" #include "Container.hpp" @@ -36,5 +35,3 @@ namespace gui { glm::vec4 getPadding() const; }; } - -#endif // GRAPHICS_UI_ELEMENTS_PANEL_HPP_ diff --git a/src/graphics/ui/elements/Plotter.hpp b/src/graphics/ui/elements/Plotter.hpp index 5f070718..f8e91226 100644 --- a/src/graphics/ui/elements/Plotter.hpp +++ b/src/graphics/ui/elements/Plotter.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_ -#define GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_ +#pragma once #include "UINode.hpp" #include "typedefs.hpp" @@ -33,5 +32,3 @@ namespace gui { void draw(const DrawContext* pctx, Assets* assets) override; }; } - -#endif // GRAPHICS_UI_ELEMENTS_PLOTTER_HPP_ diff --git a/src/graphics/ui/elements/TextBox.hpp b/src/graphics/ui/elements/TextBox.hpp index dc2ef9a6..376244cb 100644 --- a/src/graphics/ui/elements/TextBox.hpp +++ b/src/graphics/ui/elements/TextBox.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_ -#define GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_ +#pragma once #include "Panel.hpp" #include "Label.hpp" @@ -173,5 +172,3 @@ namespace gui { virtual void setOnDownPressed(const runnable &callback); }; } - -#endif // GRAPHICS_UI_ELEMENTS_TEXTBOX_HPP_ diff --git a/src/graphics/ui/elements/TrackBar.hpp b/src/graphics/ui/elements/TrackBar.hpp index e85b4e80..3d9cbfe9 100644 --- a/src/graphics/ui/elements/TrackBar.hpp +++ b/src/graphics/ui/elements/TrackBar.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_ -#define GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_ +#pragma once #include "UINode.hpp" #include "data/dynamic_fwd.hpp" @@ -49,5 +48,3 @@ namespace gui { virtual void setChangeOnRelease(bool); }; } - -#endif // GRAPHICS_UI_ELEMENTS_TRACKBAR_HPP_ diff --git a/src/graphics/ui/elements/UINode.hpp b/src/graphics/ui/elements/UINode.hpp index 3a2d3165..29de089e 100644 --- a/src/graphics/ui/elements/UINode.hpp +++ b/src/graphics/ui/elements/UINode.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_UINODE_HPP_ -#define GRAPHICS_UI_ELEMENTS_UINODE_HPP_ +#pragma once #include "delegates.hpp" #include "window/input.hpp" @@ -259,5 +258,3 @@ namespace gui { ); }; } - -#endif // GRAPHICS_UI_ELEMENTS_UINODE_HPP_ diff --git a/src/graphics/ui/elements/commons.hpp b/src/graphics/ui/elements/commons.hpp index cdad6354..82a36929 100644 --- a/src/graphics/ui/elements/commons.hpp +++ b/src/graphics/ui/elements/commons.hpp @@ -1,5 +1,4 @@ -#ifndef GRAPHICS_UI_ELEMENTS_COMMONS_HPP_ -#define GRAPHICS_UI_ELEMENTS_COMMONS_HPP_ +#pragma once #include @@ -16,5 +15,3 @@ namespace gui { int repeat; }; } - -#endif // GRAPHICS_UI_ELEMENTS_COMMONS_HPP_ diff --git a/src/graphics/ui/gui_util.hpp b/src/graphics/ui/gui_util.hpp index df16b36a..c42acde9 100644 --- a/src/graphics/ui/gui_util.hpp +++ b/src/graphics/ui/gui_util.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_GUI_GUI_UTIL_HPP_ -#define FRONTEND_GUI_GUI_UTIL_HPP_ +#pragma once #include "GUI.hpp" #include "typedefs.hpp" @@ -26,5 +25,3 @@ namespace guiutil { std::wstring yestext=L"", std::wstring notext=L""); } - -#endif // FRONTEND_GUI_GUI_UTIL_HPP_ diff --git a/src/graphics/ui/gui_xml.hpp b/src/graphics/ui/gui_xml.hpp index 6f0a9b4d..78fe8b37 100644 --- a/src/graphics/ui/gui_xml.hpp +++ b/src/graphics/ui/gui_xml.hpp @@ -1,5 +1,4 @@ -#ifndef FRONTEND_GUI_GUI_XML_HPP_ -#define FRONTEND_GUI_GUI_XML_HPP_ +#pragma once #include "GUI.hpp" #include "coders/xml.hpp" @@ -56,5 +55,3 @@ namespace gui { const std::string& getFilename() const; }; } - -#endif // FRONTEND_GUI_GUI_XML_HPP_ diff --git a/src/interfaces/Object.hpp b/src/interfaces/Object.hpp index 6f3a3f4b..bb21fedb 100644 --- a/src/interfaces/Object.hpp +++ b/src/interfaces/Object.hpp @@ -1,5 +1,4 @@ -#ifndef OBJECT_HPP_ -#define OBJECT_HPP_ +#pragma once #include #include @@ -22,5 +21,3 @@ public: virtual void update(float delta) { } virtual void destroyed() { } }; - -#endif // OBJECT_HPP_ diff --git a/src/interfaces/Serializable.hpp b/src/interfaces/Serializable.hpp index ffcbffc4..89962079 100644 --- a/src/interfaces/Serializable.hpp +++ b/src/interfaces/Serializable.hpp @@ -1,5 +1,4 @@ -#ifndef SERIALIZABLE_HPP_ -#define SERIALIZABLE_HPP_ +#pragma once #include "coders/json.hpp" @@ -11,5 +10,3 @@ public: virtual std::unique_ptr serialize() const = 0; virtual void deserialize(dynamic::Map* src) = 0; }; - -#endif // SERIALIZABLE_HPP_ diff --git a/src/interfaces/Task.hpp b/src/interfaces/Task.hpp index 9be4587c..6477c471 100644 --- a/src/interfaces/Task.hpp +++ b/src/interfaces/Task.hpp @@ -1,5 +1,4 @@ -#ifndef INTERFACES_TASK_HPP_ -#define INTERFACES_TASK_HPP_ +#pragma once #include "typedefs.hpp" @@ -16,6 +15,3 @@ public: virtual void waitForEnd() = 0; virtual void terminate() = 0; }; - -#endif // INTERFACES_TASK_HPP_ - diff --git a/src/items/Inventories.hpp b/src/items/Inventories.hpp index 132570a8..aed3e090 100644 --- a/src/items/Inventories.hpp +++ b/src/items/Inventories.hpp @@ -1,5 +1,4 @@ -#ifndef ITEMS_INVENTORIES_HPP_ -#define ITEMS_INVENTORIES_HPP_ +#pragma once #include #include @@ -41,4 +40,3 @@ public: const inventories_map& getMap() const; }; -#endif // ITEMS_INVENTORIES_HPP_ diff --git a/src/items/Inventory.hpp b/src/items/Inventory.hpp index 25e03c0b..a557d2c0 100644 --- a/src/items/Inventory.hpp +++ b/src/items/Inventory.hpp @@ -1,5 +1,4 @@ -#ifndef ITEMS_INVENTORY_HPP_ -#define ITEMS_INVENTORY_HPP_ +#pragma once #include #include @@ -59,5 +58,3 @@ public: static const size_t npos; }; - -#endif // ITEMS_INVENTORY_HPP_ diff --git a/src/items/ItemDef.hpp b/src/items/ItemDef.hpp index 11b9b1dd..348ff844 100644 --- a/src/items/ItemDef.hpp +++ b/src/items/ItemDef.hpp @@ -1,5 +1,4 @@ -#ifndef CONTENT_ITEMS_ITEM_DEF_HPP_ -#define CONTENT_ITEMS_ITEM_DEF_HPP_ +#pragma once #include #include @@ -46,5 +45,3 @@ struct ItemDef { ItemDef(const std::string& name); ItemDef(const ItemDef&) = delete; }; - -#endif // CONTENT_ITEMS_ITEM_DEF_HPP_ diff --git a/src/items/ItemStack.hpp b/src/items/ItemStack.hpp index ce642253..1a8e191d 100644 --- a/src/items/ItemStack.hpp +++ b/src/items/ItemStack.hpp @@ -1,5 +1,4 @@ -#ifndef ITEMS_ITEM_STACK_HPP_ -#define ITEMS_ITEM_STACK_HPP_ +#pragma once #include "constants.hpp" #include "typedefs.hpp" @@ -36,5 +35,3 @@ public: return count; } }; - -#endif // ITEMS_ITEM_STACK_HPP_ diff --git a/src/lighting/LightSolver.hpp b/src/lighting/LightSolver.hpp index a15f9734..3be58024 100644 --- a/src/lighting/LightSolver.hpp +++ b/src/lighting/LightSolver.hpp @@ -1,5 +1,4 @@ -#ifndef LIGHTING_LIGHTSOLVER_HPP_ -#define LIGHTING_LIGHTSOLVER_HPP_ +#pragma once #include @@ -27,5 +26,3 @@ public: void remove(int x, int y, int z); void solve(); }; - -#endif // LIGHTING_LIGHTSOLVER_HPP_ diff --git a/src/lighting/Lighting.hpp b/src/lighting/Lighting.hpp index 40003554..2bcd1693 100644 --- a/src/lighting/Lighting.hpp +++ b/src/lighting/Lighting.hpp @@ -1,6 +1,4 @@ -#ifndef LIGHTING_LIGHTING_HPP_ -#define LIGHTING_LIGHTING_HPP_ - +#pragma once #include "typedefs.hpp" class Content; @@ -27,5 +25,3 @@ public: static void prebuildSkyLight(Chunk* chunk, const ContentIndices* indices); }; - -#endif /* LIGHTING_LIGHTING_HPP_ */ diff --git a/src/lighting/Lightmap.hpp b/src/lighting/Lightmap.hpp index c02792a9..21b5bce5 100644 --- a/src/lighting/Lightmap.hpp +++ b/src/lighting/Lightmap.hpp @@ -1,5 +1,4 @@ -#ifndef LIGHTING_LIGHTMAP_HPP_ -#define LIGHTING_LIGHTMAP_HPP_ +#pragma once #include "constants.hpp" #include "typedefs.hpp" @@ -86,5 +85,3 @@ public: std::unique_ptr encode() const; static std::unique_ptr decode(const ubyte* buffer); }; - -#endif // LIGHTING_LIGHTMAP_HPP_ diff --git a/src/logic/BlocksController.hpp b/src/logic/BlocksController.hpp index 25c1f088..a3baf96f 100644 --- a/src/logic/BlocksController.hpp +++ b/src/logic/BlocksController.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_BLOCKS_CONTROLLER_HPP_ -#define LOGIC_BLOCKS_CONTROLLER_HPP_ +#pragma once #include #include @@ -62,5 +61,3 @@ public: /// @brief Add block interaction callback void listenBlockInteraction(const on_block_interaction& callback); }; - -#endif // LOGIC_BLOCKS_CONTROLLER_HPP_ diff --git a/src/logic/ChunksController.hpp b/src/logic/ChunksController.hpp index 5b58237c..5e607f51 100644 --- a/src/logic/ChunksController.hpp +++ b/src/logic/ChunksController.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_CHUNKSCONTROLLER_HPP_ -#define VOXELS_CHUNKSCONTROLLER_HPP_ +#pragma once #include @@ -31,5 +30,3 @@ public: /// @param maxDuration milliseconds reserved for chunks loading void update(int64_t maxDuration); }; - -#endif // VOXELS_CHUNKSCONTROLLER_HPP_ diff --git a/src/logic/CommandsInterpreter.hpp b/src/logic/CommandsInterpreter.hpp index afd13ab0..11144720 100644 --- a/src/logic/CommandsInterpreter.hpp +++ b/src/logic/CommandsInterpreter.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_COMMANDS_INTERPRETER_HPP_ -#define LOGIC_COMMANDS_INTERPRETER_HPP_ +#pragma once #include #include @@ -159,5 +158,3 @@ namespace cmd { } }; } - -#endif // LOGIC_COMMANDS_INTERPRETER_HPP_ diff --git a/src/logic/EngineController.hpp b/src/logic/EngineController.hpp index c548b94f..96b8f099 100644 --- a/src/logic/EngineController.hpp +++ b/src/logic/EngineController.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_ENGINE_CONTROLLER_HPP_ -#define LOGIC_ENGINE_CONTROLLER_HPP_ +#pragma once #include #include @@ -36,5 +35,3 @@ public: void reopenWorld(World* world); }; - -#endif // LOGIC_ENGINE_CONTROLLER_HPP_ diff --git a/src/logic/LevelController.hpp b/src/logic/LevelController.hpp index 6251e58d..fe16ed19 100644 --- a/src/logic/LevelController.hpp +++ b/src/logic/LevelController.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_LEVEL_CONTROLLER_HPP_ -#define LOGIC_LEVEL_CONTROLLER_HPP_ +#pragma once #include @@ -37,5 +36,3 @@ public: BlocksController* getBlocksController(); PlayerController* getPlayerController(); }; - -#endif // LOGIC_LEVEL_CONTROLLER_HPP_ diff --git a/src/logic/PlayerController.hpp b/src/logic/PlayerController.hpp index 9ef41a13..306e2336 100644 --- a/src/logic/PlayerController.hpp +++ b/src/logic/PlayerController.hpp @@ -1,5 +1,4 @@ -#ifndef PLAYER_CONTROL_HPP_ -#define PLAYER_CONTROL_HPP_ +#pragma once #include #include @@ -74,5 +73,3 @@ public: void postUpdate(float delta, bool input, bool pause); Player* getPlayer(); }; - -#endif /* PLAYER_CONTROL_HPP_ */ diff --git a/src/logic/scripting/lua/api_lua.hpp b/src/logic/scripting/lua/api_lua.hpp index 3ef61650..68a95cb8 100644 --- a/src/logic/scripting/lua/api_lua.hpp +++ b/src/logic/scripting/lua/api_lua.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_API_LUA_HPP_ -#define LOGIC_SCRIPTING_API_LUA_HPP_ +#pragma once #include #include @@ -74,5 +73,3 @@ namespace lua { } void initialize_libs_extends(lua::State* L); - -#endif // LOGIC_SCRIPTING_API_LUA_HPP_ diff --git a/src/logic/scripting/lua/libentity.hpp b/src/logic/scripting/lua/libentity.hpp index c3b0298a..b7708f02 100644 --- a/src/logic/scripting/lua/libentity.hpp +++ b/src/logic/scripting/lua/libentity.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_LUA_LIBENTITY_HPP_ -#define LOGIC_SCRIPTING_LUA_LIBENTITY_HPP_ +#pragma once #include @@ -18,5 +17,3 @@ inline std::optional get_entity(lua::State* L, int idx) { auto level = scripting::controller->getLevel(); return level->entities->get(id); } - -#endif // LOGIC_SCRIPTING_LUA_LIBENTITY_HPP_ diff --git a/src/logic/scripting/lua/lua_commons.hpp b/src/logic/scripting/lua/lua_commons.hpp index 53a491d1..d0b99f67 100644 --- a/src/logic/scripting/lua/lua_commons.hpp +++ b/src/logic/scripting/lua/lua_commons.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_LUA_HPP_ -#define LOGIC_SCRIPTING_LUA_HPP_ +#pragma once #include "delegates.hpp" #include "logic/scripting/scripting.hpp" @@ -9,7 +8,7 @@ #include #else -#include #endif #include #include @@ -31,5 +30,3 @@ namespace lua { using Number = lua_Number; using Integer = lua_Integer; } - -#endif // LOGIC_SCRIPTING_LUA_HPP_ diff --git a/src/logic/scripting/lua/lua_custom_types.hpp b/src/logic/scripting/lua/lua_custom_types.hpp index a3f9427b..4b603aca 100644 --- a/src/logic/scripting/lua/lua_custom_types.hpp +++ b/src/logic/scripting/lua/lua_custom_types.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_LUA_LUA_CUSTOM_TYPES_HPP_ -#define LOGIC_SCRIPTING_LUA_LUA_CUSTOM_TYPES_HPP_ +#pragma once #include #include @@ -31,5 +30,3 @@ namespace lua { inline static std::string TYPENAME = "bytearray"; }; } - -#endif // LOGIC_SCRIPTING_LUA_LUA_CUSTOM_TYPES_HPP_ diff --git a/src/logic/scripting/lua/lua_engine.hpp b/src/logic/scripting/lua/lua_engine.hpp index 06311e3b..1a36fab5 100644 --- a/src/logic/scripting/lua/lua_engine.hpp +++ b/src/logic/scripting/lua/lua_engine.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_LUA_STATE_HPP_ -#define LOGIC_SCRIPTING_LUA_STATE_HPP_ +#pragma once #include #include @@ -20,5 +19,3 @@ namespace lua { ); lua::State* get_main_thread(); } - -#endif // LOGIC_SCRIPTING_LUA_STATE_HPP_ diff --git a/src/logic/scripting/lua/lua_util.hpp b/src/logic/scripting/lua/lua_util.hpp index aa111bb1..0822e5bc 100644 --- a/src/logic/scripting/lua/lua_util.hpp +++ b/src/logic/scripting/lua/lua_util.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_LUA_UTIL_HPP_ -#define LOGIC_SCRIPTING_LUA_UTIL_HPP_ +#pragma once #include #include @@ -639,5 +638,3 @@ namespace lua { setglobal(L, name); } } - -#endif // LOGIC_SCRIPTING_LUA_UTIL_HPP_ diff --git a/src/logic/scripting/scripting.hpp b/src/logic/scripting/scripting.hpp index 64151fbf..94723f05 100644 --- a/src/logic/scripting/scripting.hpp +++ b/src/logic/scripting/scripting.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_SCRIPTING_HPP_ -#define LOGIC_SCRIPTING_SCRIPTING_HPP_ +#pragma once #include #include @@ -171,5 +170,3 @@ namespace scripting { /// @brief Finalize lua state. Using scripting after will lead to Lua panic void close(); } - -#endif // LOGIC_SCRIPTING_SCRIPTING_HPP_ diff --git a/src/logic/scripting/scripting_functional.hpp b/src/logic/scripting/scripting_functional.hpp index c1f91cb8..e1d40040 100644 --- a/src/logic/scripting/scripting_functional.hpp +++ b/src/logic/scripting/scripting_functional.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_HPP_ -#define LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_HPP_ +#pragma once #include #include @@ -78,5 +77,3 @@ namespace scripting { const std::string& file = "" ); } - -#endif // LOGIC_SCRIPTING_SCRIPTING_FUNCTIONAL_HPP_ diff --git a/src/logic/scripting/scripting_hud.hpp b/src/logic/scripting/scripting_hud.hpp index ac27afa4..c2d9b7f5 100644 --- a/src/logic/scripting/scripting_hud.hpp +++ b/src/logic/scripting/scripting_hud.hpp @@ -1,5 +1,4 @@ -#ifndef LOGIC_SCRIPTING_SCRIPTING_HUD_HPP_ -#define LOGIC_SCRIPTING_SCRIPTING_HUD_HPP_ +#pragma once #include #include @@ -27,5 +26,3 @@ namespace scripting { const scriptenv &env, const std::string &packid, const fs::path &file ); } - -#endif // LOGIC_SCRIPTING_SCRIPTING_HUD_HPP_ diff --git a/src/maths/FrustumCulling.hpp b/src/maths/FrustumCulling.hpp index 00cd9686..27d62a52 100644 --- a/src/maths/FrustumCulling.hpp +++ b/src/maths/FrustumCulling.hpp @@ -1,5 +1,4 @@ -#ifndef MATHS_FRUSTUM_CULLING_HPP_ -#define MATHS_FRUSTUM_CULLING_HPP_ +#pragma once #include @@ -128,5 +127,3 @@ inline glm::vec3 Frustum::intersection(const glm::vec3* crosses) const { glm::vec3(m_planes[a].w, m_planes[b].w, m_planes[c].w); return res * (-1.0f / D); } - -#endif // MATHS_FRUSTUM_CULLING_HPP_ diff --git a/src/maths/LMPacker.hpp b/src/maths/LMPacker.hpp index 5eb86ee7..b27b8059 100644 --- a/src/maths/LMPacker.hpp +++ b/src/maths/LMPacker.hpp @@ -1,7 +1,6 @@ /// C++ LMPacker port /// https://github.com/MihailRis/LMPacker -#ifndef LMPACKER_HPP_ -#define LMPACKER_HPP_ +#pragma once #include #include @@ -59,5 +58,3 @@ public: return rects; } }; - -#endif // LMPACKER_HPP_ diff --git a/src/maths/UVRegion.hpp b/src/maths/UVRegion.hpp index 21f7694e..ec58dfb5 100644 --- a/src/maths/UVRegion.hpp +++ b/src/maths/UVRegion.hpp @@ -1,5 +1,4 @@ -#ifndef MATHS_UVREGION_HPP_ -#define MATHS_UVREGION_HPP_ +#pragma once #include @@ -24,5 +23,3 @@ struct UVRegion { return fabs(v2 - v1); } }; - -#endif // MATHS_UVREGION_HPP_ diff --git a/src/maths/aabb.hpp b/src/maths/aabb.hpp index 34f97383..6354d7a8 100644 --- a/src/maths/aabb.hpp +++ b/src/maths/aabb.hpp @@ -1,5 +1,4 @@ -#ifndef MATHS_AABB_HPP_ -#define MATHS_AABB_HPP_ +#pragma once #include @@ -103,5 +102,3 @@ struct AABB { ); } }; - -#endif // MATHS_AABB_HPP_ diff --git a/src/maths/fastmaths.hpp b/src/maths/fastmaths.hpp index 3f9f8256..d0dcbb8e 100644 --- a/src/maths/fastmaths.hpp +++ b/src/maths/fastmaths.hpp @@ -1,5 +1,4 @@ -#ifndef MATHS_FASTMATHS_HPP_ -#define MATHS_FASTMATHS_HPP_ +#pragma once #include "typedefs.hpp" @@ -19,5 +18,3 @@ public: return rand() / float(0x7FFF); } }; - -#endif // MATHS_FASTMATHS_HPP_ diff --git a/src/maths/rays.hpp b/src/maths/rays.hpp index b30814b8..f7e916e3 100644 --- a/src/maths/rays.hpp +++ b/src/maths/rays.hpp @@ -1,5 +1,4 @@ -#ifndef MATHS_RAYS_HPP_ -#define MATHS_RAYS_HPP_ +#pragma once #include "aabb.hpp" #include @@ -76,5 +75,3 @@ public: scalar_t& distance_ret ); }; - -#endif // SRC_VOXNATHS_HPP_ diff --git a/src/maths/util.hpp b/src/maths/util.hpp index d6a14f7e..5e671082 100644 --- a/src/maths/util.hpp +++ b/src/maths/util.hpp @@ -1,5 +1,4 @@ -#ifndef MATHS_UTIL_HPP_ -#define MATHS_UTIL_HPP_ +#pragma once #include @@ -51,5 +50,3 @@ public: rand(); } }; - -#endif // MATHS_UTIL_HPP_ diff --git a/src/maths/voxmaths.hpp b/src/maths/voxmaths.hpp index 89474182..1160b1e2 100644 --- a/src/maths/voxmaths.hpp +++ b/src/maths/voxmaths.hpp @@ -1,5 +1,4 @@ -#ifndef VOXNATHS_HPP_ -#define VOXNATHS_HPP_ +#pragma once #include "typedefs.hpp" @@ -47,5 +46,3 @@ inline int fast_rand(void) { inline light_t light_pack(ubyte r, ubyte g, ubyte b, ubyte s) { return r | (g << 4) | (b << 8) | (s << 12); } - -#endif // VOXNATHS_HPP_ diff --git a/src/objects/Entities.hpp b/src/objects/Entities.hpp index a390b6b6..adf36ce5 100644 --- a/src/objects/Entities.hpp +++ b/src/objects/Entities.hpp @@ -1,5 +1,4 @@ -#ifndef OBJECTS_ENTITIES_HPP_ -#define OBJECTS_ENTITIES_HPP_ +#pragma once #include #include @@ -256,5 +255,3 @@ public: return nextID; } }; - -#endif // OBJECTS_ENTITIES_HPP_ diff --git a/src/objects/EntityDef.hpp b/src/objects/EntityDef.hpp index 811c8def..021c67f1 100644 --- a/src/objects/EntityDef.hpp +++ b/src/objects/EntityDef.hpp @@ -1,5 +1,4 @@ -#ifndef OBJECTS_ENTITY_DEF_HPP_ -#define OBJECTS_ENTITY_DEF_HPP_ +#pragma once #include #include @@ -58,5 +57,3 @@ struct EntityDef { EntityDef(const std::string& name) : name(name) {} EntityDef(const EntityDef&) = delete; }; - -#endif // OBJECTS_ENTITY_DEF_HPP_ diff --git a/src/objects/Player.hpp b/src/objects/Player.hpp index 5a85478f..94ce3096 100644 --- a/src/objects/Player.hpp +++ b/src/objects/Player.hpp @@ -1,5 +1,4 @@ -#ifndef SRC_OBJECTS_PLAYER_HPP_ -#define SRC_OBJECTS_PLAYER_HPP_ +#pragma once #include #include @@ -113,5 +112,3 @@ public: return objectUID; } }; - -#endif // SRC_OBJECTS_PLAYER_HPP_ diff --git a/src/objects/rigging.hpp b/src/objects/rigging.hpp index ee7d7ff0..ca9ec5de 100644 --- a/src/objects/rigging.hpp +++ b/src/objects/rigging.hpp @@ -1,5 +1,4 @@ -#ifndef OBJECTS_RIGGING_HPP_ -#define OBJECTS_RIGGING_HPP_ +#pragma once #include #include @@ -141,5 +140,3 @@ namespace rigging { } }; }; - -#endif // OBJECTS_RIGGING_HPP_ diff --git a/src/physics/Hitbox.hpp b/src/physics/Hitbox.hpp index 009a0426..2c5a4e78 100644 --- a/src/physics/Hitbox.hpp +++ b/src/physics/Hitbox.hpp @@ -1,5 +1,4 @@ -#ifndef PHYSICS_HITBOX_HPP_ -#define PHYSICS_HITBOX_HPP_ +#pragma once #include "maths/aabb.hpp" #include "typedefs.hpp" @@ -62,5 +61,3 @@ struct Hitbox { return AABB(position-halfsize, position+halfsize); } }; - -#endif // PHYSICS_HITBOX_HPP_ diff --git a/src/physics/PhysicsSolver.hpp b/src/physics/PhysicsSolver.hpp index 3580e4bc..35f8158e 100644 --- a/src/physics/PhysicsSolver.hpp +++ b/src/physics/PhysicsSolver.hpp @@ -1,5 +1,4 @@ -#ifndef PHYSICS_PHYSICSSOLVER_HPP_ -#define PHYSICS_PHYSICSSOLVER_HPP_ +#pragma once #include "Hitbox.hpp" @@ -42,5 +41,3 @@ public: void removeSensor(Sensor* sensor); }; - -#endif // PHYSICS_PHYSICSSOLVER_HPP_ diff --git a/src/settings.hpp b/src/settings.hpp index 58fb2c07..dcf5086b 100644 --- a/src/settings.hpp +++ b/src/settings.hpp @@ -1,5 +1,4 @@ -#ifndef SETTINGS_HPP_ -#define SETTINGS_HPP_ +#pragma once #include #include @@ -87,5 +86,3 @@ struct EngineSettings { DebugSettings debug; UiSettings ui; }; - -#endif // SETTINGS_HPP_ diff --git a/src/typedefs.hpp b/src/typedefs.hpp index 0d8b9b6e..3925d277 100644 --- a/src/typedefs.hpp +++ b/src/typedefs.hpp @@ -1,5 +1,4 @@ -#ifndef TYPEDEFS_HPP_ -#define TYPEDEFS_HPP_ +#pragma once #include #include @@ -25,5 +24,3 @@ using entityid_t = uint64_t; using itemcount_t = uint32_t; using blockstate_t = uint16_t; using light_t = uint16_t; - -#endif // TYPEDEFS_HPP_ diff --git a/src/util/BufferPool.hpp b/src/util/BufferPool.hpp index f5826fb9..0d775b90 100644 --- a/src/util/BufferPool.hpp +++ b/src/util/BufferPool.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_BUFFER_POOL_HPP_ -#define UTIL_BUFFER_POOL_HPP_ +#pragma once #include #include @@ -38,5 +37,3 @@ namespace util { } }; } - -#endif // UTIL_BUFFER_POOL_HPP_ diff --git a/src/util/Clock.hpp b/src/util/Clock.hpp index 8fb45cfb..37c5f4eb 100644 --- a/src/util/Clock.hpp +++ b/src/util/Clock.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_CLOCK_HPP_ -#define UTIL_CLOCK_HPP_ +#pragma once namespace util { class Clock { @@ -20,5 +19,3 @@ namespace util { int getTickId() const; }; } - -#endif // UTIL_CLOCK_HPP_ diff --git a/src/util/ObjectsKeeper.hpp b/src/util/ObjectsKeeper.hpp index 5a046408..000c4fc1 100644 --- a/src/util/ObjectsKeeper.hpp +++ b/src/util/ObjectsKeeper.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_OBJECTS_KEEPER_HPP_ -#define UTIL_OBJECTS_KEEPER_HPP_ +#pragma once #include #include @@ -17,5 +16,3 @@ namespace util { } }; } - -#endif // UTIL_OBJECTS_KEEPER_HPP_ diff --git a/src/util/RunnablesList.hpp b/src/util/RunnablesList.hpp index 40fe9839..e655b42c 100644 --- a/src/util/RunnablesList.hpp +++ b/src/util/RunnablesList.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_RUNNABLES_LIST_HPP_ -#define UTIL_RUNNABLES_LIST_HPP_ +#pragma once #include #include @@ -29,5 +28,3 @@ namespace util { } }; } - -#endif // UTIL_RUNNABLES_LIST_HPP_ diff --git a/src/util/ThreadPool.hpp b/src/util/ThreadPool.hpp index 4ac3ee19..c375b445 100644 --- a/src/util/ThreadPool.hpp +++ b/src/util/ThreadPool.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_THREAD_POOL_HPP_ -#define UTIL_THREAD_POOL_HPP_ +#pragma once #include #include @@ -255,5 +254,3 @@ namespace util { }; } // namespace util - -#endif // UTIL_THREAD_POOL_HPP_ diff --git a/src/util/command_line.hpp b/src/util/command_line.hpp index 0dd157d7..9715c52d 100644 --- a/src/util/command_line.hpp +++ b/src/util/command_line.hpp @@ -1,9 +1,6 @@ -#ifndef UTIL_COMMAND_LINE_HPP_ -#define UTIL_COMMAND_LINE_HPP_ +#pragma once class EnginePaths; /// @return false if engine start can bool parse_cmdline(int argc, char** argv, EnginePaths& paths); - -#endif // UTIL_COMMAND_LINE_HPP_ diff --git a/src/util/data_io.hpp b/src/util/data_io.hpp index dfad3bb4..c36007b5 100644 --- a/src/util/data_io.hpp +++ b/src/util/data_io.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_DATA_IO_HPP_ -#define UTIL_DATA_IO_HPP_ +#pragma once #include "typedefs.hpp" @@ -47,5 +46,3 @@ namespace dataio { dest[offset + 7] = (char)(value >> 0 & 255); } } - -#endif // UTIL_DATA_IO_HPP_ diff --git a/src/util/listutil.hpp b/src/util/listutil.hpp index dc96b945..dec9499b 100644 --- a/src/util/listutil.hpp +++ b/src/util/listutil.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_LISTUTIL_HPP_ -#define UTIL_LISTUTIL_HPP_ +#pragma once #include #include @@ -14,5 +13,3 @@ namespace util { std::string to_string(const std::vector& vec); } - -#endif // UTIL_LISTUTIL_HPP_ diff --git a/src/util/platform.hpp b/src/util/platform.hpp index 8b04ed5f..a620acad 100644 --- a/src/util/platform.hpp +++ b/src/util/platform.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_PLATFORM_HPP_ -#define UTIL_PLATFORM_HPP_ +#pragma once #include @@ -8,5 +7,3 @@ namespace platform { // @return environment locale in ISO format ll_CC std::string detect_locale(); } - -#endif // UTIL_PLATFORM_HPP_ diff --git a/src/util/stringutil.hpp b/src/util/stringutil.hpp index 69db71e8..54a0a5e2 100644 --- a/src/util/stringutil.hpp +++ b/src/util/stringutil.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_STRINGUTIL_HPP_ -#define UTIL_STRINGUTIL_HPP_ +#pragma once #include #include @@ -62,5 +61,3 @@ namespace util { std::pair split_at(std::string_view view, char c); } - -#endif // UTIL_STRINGUTIL_HPP_ diff --git a/src/util/timeutil.hpp b/src/util/timeutil.hpp index eeb6e63e..514e745c 100644 --- a/src/util/timeutil.hpp +++ b/src/util/timeutil.hpp @@ -1,5 +1,4 @@ -#ifndef UTIL_TIMEUTIL_HPP_ -#define UTIL_TIMEUTIL_HPP_ +#pragma once #include @@ -34,5 +33,3 @@ namespace timeutil { void from_value(float value, int& hour, int& minute, int& second); } - -#endif // UTIL_TIMEUTIL_HPP_ diff --git a/src/voxels/Block.hpp b/src/voxels/Block.hpp index 8abf8578..a32ddd1c 100644 --- a/src/voxels/Block.hpp +++ b/src/voxels/Block.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_BLOCK_HPP_ -#define VOXELS_BLOCK_HPP_ +#pragma once #include #include @@ -217,5 +216,3 @@ public: inline glm::ivec3 get_ground_direction(const Block& def, int rotation) { return -def.rotations.variants[rotation].axisY; } - -#endif // VOXELS_BLOCK_HPP_ diff --git a/src/voxels/Chunk.hpp b/src/voxels/Chunk.hpp index f79e83e0..14ead964 100644 --- a/src/voxels/Chunk.hpp +++ b/src/voxels/Chunk.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_CHUNK_HPP_ -#define VOXELS_CHUNK_HPP_ +#pragma once #include @@ -74,5 +73,3 @@ public: static void convert(ubyte* data, const ContentLUT* lut); }; - -#endif /* VOXELS_CHUNK_HPP_ */ diff --git a/src/voxels/Chunks.hpp b/src/voxels/Chunks.hpp index c0940ff0..d17cf9b9 100644 --- a/src/voxels/Chunks.hpp +++ b/src/voxels/Chunks.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_CHUNKS_HPP_ -#define VOXELS_CHUNKS_HPP_ +#pragma once #include @@ -115,5 +114,3 @@ public: void save(Chunk* chunk); void saveAll(); }; - -#endif // VOXELS_CHUNKS_HPP_ diff --git a/src/voxels/ChunksStorage.hpp b/src/voxels/ChunksStorage.hpp index 10414802..887af1ca 100644 --- a/src/voxels/ChunksStorage.hpp +++ b/src/voxels/ChunksStorage.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_CHUNKSSTORAGE_HPP_ -#define VOXELS_CHUNKSSTORAGE_HPP_ +#pragma once #include #include @@ -27,5 +26,3 @@ public: void getVoxels(VoxelsVolume* volume, bool backlight = false) const; std::shared_ptr create(int x, int z); }; - -#endif // VOXELS_CHUNKSSTORAGE_HPP_ diff --git a/src/voxels/DefaultWorldGenerator.hpp b/src/voxels/DefaultWorldGenerator.hpp index 47c5d401..a53770c8 100644 --- a/src/voxels/DefaultWorldGenerator.hpp +++ b/src/voxels/DefaultWorldGenerator.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_DEFAULTWORLDGENERATOR_HPP_ -#define VOXELS_DEFAULTWORLDGENERATOR_HPP_ +#pragma once #include "typedefs.hpp" #include "WorldGenerator.hpp" @@ -14,5 +13,3 @@ public: void generate(voxel* voxels, int x, int z, int seed); }; - -#endif // VOXELS_DEFAULTWORLDGENERATOR_HPP_ diff --git a/src/voxels/FlatWorldGenerator.hpp b/src/voxels/FlatWorldGenerator.hpp index 7e3e36a8..8d10ae4b 100644 --- a/src/voxels/FlatWorldGenerator.hpp +++ b/src/voxels/FlatWorldGenerator.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_FLATWORLDGENERATOR_HPP_ -#define VOXELS_FLATWORLDGENERATOR_HPP_ +#pragma once #include "typedefs.hpp" #include "WorldGenerator.hpp" @@ -14,5 +13,3 @@ public: void generate(voxel* voxels, int x, int z, int seed); }; - -#endif // VOXELS_FLATWORLDGENERATOR_HPP_ diff --git a/src/voxels/VoxelsVolume.hpp b/src/voxels/VoxelsVolume.hpp index 7109dd41..1a7e2b50 100644 --- a/src/voxels/VoxelsVolume.hpp +++ b/src/voxels/VoxelsVolume.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_VOXELSVOLUME_HPP_ -#define VOXELS_VOXELSVOLUME_HPP_ +#pragma once #include "constants.hpp" #include "typedefs.hpp" @@ -65,5 +64,3 @@ public: return lights[vox_index(bx - x, by - y, bz - z, w, d)]; } }; - -#endif // VOXELS_VOXELSVOLUME_HPP_ diff --git a/src/voxels/WorldGenerator.hpp b/src/voxels/WorldGenerator.hpp index fa52ee53..7a8c98f3 100644 --- a/src/voxels/WorldGenerator.hpp +++ b/src/voxels/WorldGenerator.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_WORLDGENERATOR_HPP_ -#define VOXELS_WORLDGENERATOR_HPP_ +#pragma once #include @@ -26,5 +25,3 @@ public: virtual void generate(voxel* voxels, int x, int z, int seed) = 0; }; - -#endif // VOXELS_WORLDGENERATOR_HPP_ diff --git a/src/voxels/voxel.hpp b/src/voxels/voxel.hpp index fb6f4179..dcff106f 100644 --- a/src/voxels/voxel.hpp +++ b/src/voxels/voxel.hpp @@ -1,5 +1,4 @@ -#ifndef VOXELS_VOXEL_HPP_ -#define VOXELS_VOXEL_HPP_ +#pragma once #include "typedefs.hpp" @@ -40,5 +39,3 @@ struct voxel { blockstate state; }; static_assert(sizeof(voxel) == 4); - -#endif // VOXELS_VOXEL_HPP_ diff --git a/src/window/Camera.hpp b/src/window/Camera.hpp index 2c2cccfe..639a27df 100644 --- a/src/window/Camera.hpp +++ b/src/window/Camera.hpp @@ -1,5 +1,4 @@ -#ifndef WINDOW_CAMERA_HPP_ -#define WINDOW_CAMERA_HPP_ +#pragma once #define GLM_FORCE_RADIANS #include @@ -35,5 +34,3 @@ public: void setFov(float fov); float getFov() const; }; - -#endif // WINDOW_CAMERA_HPP_ diff --git a/src/window/Events.hpp b/src/window/Events.hpp index 61526178..230145a9 100644 --- a/src/window/Events.hpp +++ b/src/window/Events.hpp @@ -1,5 +1,4 @@ -#ifndef WINDOW_EVENTS_HPP_ -#define WINDOW_EVENTS_HPP_ +#pragma once #include #include @@ -56,5 +55,3 @@ public: const std::string& filename, const std::string& source ); }; - -#endif // WINDOW_EVENTS_HPP_ diff --git a/src/window/Window.hpp b/src/window/Window.hpp index 31a65a4a..78d63ebe 100644 --- a/src/window/Window.hpp +++ b/src/window/Window.hpp @@ -1,5 +1,4 @@ -#ifndef WINDOW_WINDOW_HPP_ -#define WINDOW_WINDOW_HPP_ +#pragma once #include #include @@ -63,5 +62,3 @@ public: static std::unique_ptr takeScreenshot(); }; - -#endif // WINDOW_WINDOW_HPP_ diff --git a/src/window/input.hpp b/src/window/input.hpp index 322e5caa..a90c8fe0 100644 --- a/src/window/input.hpp +++ b/src/window/input.hpp @@ -1,5 +1,4 @@ -#ifndef WINDOW_INPUT_HPP_ -#define WINDOW_INPUT_HPP_ +#pragma once #include @@ -167,5 +166,3 @@ struct Binding { return ""; } }; - -#endif // WINDOW_INPUT_HPP_ diff --git a/src/world/Level.hpp b/src/world/Level.hpp index 52f397d1..240dd808 100644 --- a/src/world/Level.hpp +++ b/src/world/Level.hpp @@ -1,5 +1,4 @@ -#ifndef WORLD_LEVEL_HPP_ -#define WORLD_LEVEL_HPP_ +#pragma once #include #include @@ -85,5 +84,3 @@ public: std::shared_ptr getCamera(const std::string& name); }; - -#endif /* WORLD_LEVEL_HPP_ */ diff --git a/src/world/LevelEvents.hpp b/src/world/LevelEvents.hpp index 7e3247ed..d0518b5c 100644 --- a/src/world/LevelEvents.hpp +++ b/src/world/LevelEvents.hpp @@ -1,5 +1,4 @@ -#ifndef WORLD_LEVEL_EVENTS_HPP_ -#define WORLD_LEVEL_EVENTS_HPP_ +#pragma once #include #include @@ -20,5 +19,3 @@ public: void listen(lvl_event_type type, const chunk_event_func& func); void trigger(lvl_event_type type, Chunk* chunk); }; - -#endif // WORLD_LEVEL_EVENTS_HPP_ diff --git a/src/world/World.hpp b/src/world/World.hpp index b6a00b50..7f30e52c 100644 --- a/src/world/World.hpp +++ b/src/world/World.hpp @@ -1,5 +1,4 @@ -#ifndef WORLD_WORLD_HPP_ -#define WORLD_WORLD_HPP_ +#pragma once #include #include @@ -152,5 +151,3 @@ public: std::unique_ptr serialize() const override; void deserialize(dynamic::Map* src) override; }; - -#endif // WORLD_WORLD_HPP_ diff --git a/src/world/WorldGenerators.hpp b/src/world/WorldGenerators.hpp index b100b708..91c3a121 100644 --- a/src/world/WorldGenerators.hpp +++ b/src/world/WorldGenerators.hpp @@ -1,5 +1,4 @@ -#ifndef WORLD_WORLDGENERATORS_HPP_ -#define WORLD_WORLDGENERATORS_HPP_ +#pragma once #include #include @@ -32,5 +31,3 @@ void WorldGenerators::addGenerator(std::string id) { return (WorldGenerator*)new T(content); }; } - -#endif /* WORLD_WORLDGENERATORS_HPP_ */