From 722bdd82b1ecd7d55d9745d8033042e0f1b52d7e Mon Sep 17 00:00:00 2001 From: Riyyi Date: Thu, 22 Sep 2022 00:00:15 +0200 Subject: [PATCH] Engine: Change include guards to #pragma once --- src/inferno.h | 5 +---- src/inferno/application.h | 5 +---- src/inferno/assert.h | 5 +---- src/inferno/component/cameracomponent.h | 7 ++----- src/inferno/component/luascriptcomponent.h | 7 ++----- src/inferno/component/nativescriptcomponent.h | 7 ++----- src/inferno/component/spritecomponent.h | 7 ++----- src/inferno/component/tagcomponent.h | 9 +++------ src/inferno/component/textareacomponent.h | 7 ++----- src/inferno/component/transformcomponent.h | 7 ++----- src/inferno/core.h | 5 +---- src/inferno/entrypoint.h | 5 +---- src/inferno/event/applicationevent.h | 7 ++----- src/inferno/event/event.h | 5 +---- src/inferno/event/joystickevent.h | 7 ++----- src/inferno/event/keyevent.h | 7 ++----- src/inferno/event/mouseevent.h | 7 ++----- src/inferno/io/file.h | 7 ++----- src/inferno/io/gltffile.h | 5 +---- src/inferno/io/input.h | 7 ++----- src/inferno/io/log.h | 7 ++----- src/inferno/keycodes.h | 5 +---- src/inferno/render/buffer.h | 7 ++----- src/inferno/render/context.h | 8 ++------ src/inferno/render/font.h | 5 +---- src/inferno/render/framebuffer.h | 15 ++++++--------- src/inferno/render/gltf.h | 5 +---- src/inferno/render/renderer.h | 5 +---- src/inferno/render/renderer3d.h | 5 +---- src/inferno/render/shader.h | 5 +---- src/inferno/render/texture.h | 5 +---- src/inferno/scene/scene.h | 7 ++----- src/inferno/script/cameracontroller.h | 8 ++------ src/inferno/script/luascript.h | 7 ++----- src/inferno/script/nativescript.h | 7 ++----- src/inferno/script/registration.h | 7 ++----- src/inferno/settings.h | 5 +---- src/inferno/singleton.h | 6 +----- src/inferno/system/camerasystem.h | 5 +---- src/inferno/system/rendersystem.h | 5 +---- src/inferno/system/scriptsystem.h | 5 +---- src/inferno/system/textareasystem.h | 5 +---- src/inferno/system/transformsystem.h | 7 ++----- src/inferno/time.h | 7 ++----- src/inferno/util/integer.h | 9 +++------ src/inferno/util/json.h | 5 +---- src/inferno/util/string.h | 5 +---- src/inferno/window.h | 7 ++----- 48 files changed, 80 insertions(+), 227 deletions(-) diff --git a/src/inferno.h b/src/inferno.h index 4f019f8..02bcf1d 100644 --- a/src/inferno.h +++ b/src/inferno.h @@ -1,5 +1,4 @@ -#ifndef INFERNO_H -#define INFERNO_H +#pragma once // For use by the game @@ -12,5 +11,3 @@ #include "inferno/io/log.h" // ----------------------------------------- - -#endif // INFERNO_H diff --git a/src/inferno/application.h b/src/inferno/application.h index 69ae2d7..17d1e0f 100644 --- a/src/inferno/application.h +++ b/src/inferno/application.h @@ -1,5 +1,4 @@ -#ifndef APPLICATION_H -#define APPLICATION_H +#pragma once #include // std::unique_ptr, std::shared_ptr @@ -50,8 +49,6 @@ namespace Inferno { } // namespace Inferno -#endif // APPLICATION_H - // C++17 features used: // - std::string_view -> log.h // - std::shared_ptr array management -> renderer.h diff --git a/src/inferno/assert.h b/src/inferno/assert.h index eb27b23..4af2d94 100644 --- a/src/inferno/assert.h +++ b/src/inferno/assert.h @@ -1,5 +1,4 @@ -#ifndef ASSERT_H -#define ASSERT_H +#pragma once #include // raise #include // uint32_t @@ -111,6 +110,4 @@ inline void __crash() } -#endif // ASSERT_H - // https://github.com/scottt/debugbreak diff --git a/src/inferno/component/cameracomponent.h b/src/inferno/component/cameracomponent.h index 7850559..1bf22b3 100644 --- a/src/inferno/component/cameracomponent.h +++ b/src/inferno/component/cameracomponent.h @@ -1,5 +1,4 @@ -#ifndef CAMERA_COMPONENT_H -#define CAMERA_COMPONENT_H +#pragma once #include "glm/ext/matrix_float4x4.hpp" // glm::mat4 #include "glm/ext/vector_float3.hpp" // glm::vec3 @@ -27,6 +26,4 @@ namespace Inferno { glm::mat4 projection { 1.0f }; // Identity matrix }; -} - -#endif // CAMERA_COMPONENT_H +} // namespace Inferno diff --git a/src/inferno/component/luascriptcomponent.h b/src/inferno/component/luascriptcomponent.h index 46bf7e2..8cede08 100644 --- a/src/inferno/component/luascriptcomponent.h +++ b/src/inferno/component/luascriptcomponent.h @@ -1,5 +1,4 @@ -#ifndef LUA_SCRIPT_COMPONENT_H -#define LUA_SCRIPT_COMPONENT_H +#pragma once #include // std::string #include // std::move @@ -17,6 +16,4 @@ namespace Inferno { LuaScriptComponent(const std::string& path) : path(std::move(path)) {} }; -} - -#endif // LUA_SCRIPT_COMPONENT_H +} // namespace Inferno diff --git a/src/inferno/component/nativescriptcomponent.h b/src/inferno/component/nativescriptcomponent.h index 5764af5..3badef6 100644 --- a/src/inferno/component/nativescriptcomponent.h +++ b/src/inferno/component/nativescriptcomponent.h @@ -1,5 +1,4 @@ -#ifndef NATIVE_SCRIPT_COMPONENT_H -#define NATIVE_SCRIPT_COMPONENT_H +#pragma once #include "inferno/assert.h" #include "inferno/script/nativescript.h" @@ -28,6 +27,4 @@ namespace Inferno { } }; -} - -#endif // NATIVE_SCRIPT_COMPONENT_H +} // namespace Inferno diff --git a/src/inferno/component/spritecomponent.h b/src/inferno/component/spritecomponent.h index 3621e27..825e549 100644 --- a/src/inferno/component/spritecomponent.h +++ b/src/inferno/component/spritecomponent.h @@ -1,5 +1,4 @@ -#ifndef SPRITE_COMPONENT_H -#define SPRITE_COMPONENT_H +#pragma once #include // std::shared_ptr @@ -14,6 +13,4 @@ namespace Inferno { std::shared_ptr texture; }; -} - -#endif // SPRITE_COMPONENT_H +} // namespace Inferno diff --git a/src/inferno/component/tagcomponent.h b/src/inferno/component/tagcomponent.h index 5f2035c..2fa75fc 100644 --- a/src/inferno/component/tagcomponent.h +++ b/src/inferno/component/tagcomponent.h @@ -1,7 +1,6 @@ -#ifndef TAG_COMPONENT_H -#define TAG_COMPONENT_H +#pragma once -#include // std::string +#include // std::string #include // std::move namespace Inferno { @@ -16,6 +15,4 @@ namespace Inferno { operator const std::string&() const { return tag; } }; -} - -#endif // TAG_COMPONENT_H +} // namespace Inferno diff --git a/src/inferno/component/textareacomponent.h b/src/inferno/component/textareacomponent.h index fe3b41f..9921589 100644 --- a/src/inferno/component/textareacomponent.h +++ b/src/inferno/component/textareacomponent.h @@ -1,5 +1,4 @@ -#ifndef TEXTAREA_COMPONENT_H -#define TEXTAREA_COMPONENT_H +#pragma once #include // uint32_t #include // std::string @@ -27,6 +26,4 @@ namespace Inferno { // float dropShadow { 0.0f }; }; -} - -#endif // TEXTAREA_COMPONENT_H +} // namespace Inferno diff --git a/src/inferno/component/transformcomponent.h b/src/inferno/component/transformcomponent.h index c5a4e97..3e0c0bd 100644 --- a/src/inferno/component/transformcomponent.h +++ b/src/inferno/component/transformcomponent.h @@ -1,5 +1,4 @@ -#ifndef TRANSFORM_COMPONENT_H -#define TRANSFORM_COMPONENT_H +#pragma once #include "glm/ext/matrix_float4x4.hpp" // glm::mat4 #include "glm/ext/vector_float3.hpp" // glm::vec3 @@ -22,6 +21,4 @@ namespace Inferno { const LogStream& operator<<(const LogStream& stream, const glm::vec4& value); const LogStream& operator<<(const LogStream& stream, const glm::mat4& value); const LogStream& operator<<(const LogStream& stream, const TransformComponent& value); -} - -#endif // TRANSFORM_COMPONENT_H +} // namespace Inferno diff --git a/src/inferno/core.h b/src/inferno/core.h index ac78e98..05d5380 100644 --- a/src/inferno/core.h +++ b/src/inferno/core.h @@ -1,5 +1,4 @@ -#ifndef CORE_H -#define CORE_H +#pragma once #include // std::bind, std::placeholders @@ -20,5 +19,3 @@ #elif defined(_MSC_VER) #define MSVC #endif - -#endif // CORE_H diff --git a/src/inferno/entrypoint.h b/src/inferno/entrypoint.h index 457f34d..6f7dd3a 100644 --- a/src/inferno/entrypoint.h +++ b/src/inferno/entrypoint.h @@ -4,8 +4,7 @@ * `g_` for global variables. */ -#ifndef ENTRYPOINT_H -#define ENTRYPOINT_H +#pragma once #include "inferno/application.h" @@ -23,5 +22,3 @@ int main(int argc, char* argv[]) return status; } - -#endif // ENTRYPOINT_H diff --git a/src/inferno/event/applicationevent.h b/src/inferno/event/applicationevent.h index 33344c5..1db4a27 100644 --- a/src/inferno/event/applicationevent.h +++ b/src/inferno/event/applicationevent.h @@ -1,5 +1,4 @@ -#ifndef APPLICATIONEVENT_H -#define APPLICATIONEVENT_H +#pragma once #include // std::stringstream @@ -37,6 +36,4 @@ namespace Inferno { int m_width; int m_height; }; -} - -#endif // APPLICATIONEVENT_H +} // namespace Inferno diff --git a/src/inferno/event/event.h b/src/inferno/event/event.h index 9af4a40..bd18521 100644 --- a/src/inferno/event/event.h +++ b/src/inferno/event/event.h @@ -1,5 +1,4 @@ -#ifndef EVENT_H -#define EVENT_H +#pragma once #include // std::ostream @@ -110,5 +109,3 @@ inline std::ostream& operator<<(std::ostream& os, const Event& e) } } // namespace Inferno - -#endif // EVENT_H diff --git a/src/inferno/event/joystickevent.h b/src/inferno/event/joystickevent.h index 4afd63d..596b881 100644 --- a/src/inferno/event/joystickevent.h +++ b/src/inferno/event/joystickevent.h @@ -1,5 +1,4 @@ -#ifndef JOYSTICKEVENT_H -#define JOYSTICKEVENT_H +#pragma once #include // std::stringstream @@ -51,6 +50,4 @@ namespace Inferno { EVENT_CLASS_TYPE(JoystickDisconnected) }; -} - -#endif // JOYSTICKEVENT_H +} // namespace Inferno diff --git a/src/inferno/event/keyevent.h b/src/inferno/event/keyevent.h index 74fc238..e4134e4 100644 --- a/src/inferno/event/keyevent.h +++ b/src/inferno/event/keyevent.h @@ -1,5 +1,4 @@ -#ifndef KEYEVENT_H -#define KEYEVENT_H +#pragma once #include // std::stringstream @@ -66,6 +65,4 @@ namespace Inferno { EVENT_CLASS_TYPE(KeyPress) }; -} - -#endif // KEYEVENT_H +} // namespace Inferno diff --git a/src/inferno/event/mouseevent.h b/src/inferno/event/mouseevent.h index 4c2fc0b..282c97d 100644 --- a/src/inferno/event/mouseevent.h +++ b/src/inferno/event/mouseevent.h @@ -1,5 +1,4 @@ -#ifndef MOUSEEVENT_H -#define MOUSEEVENT_H +#pragma once #include // std::stringstream @@ -101,6 +100,4 @@ namespace Inferno { float m_yOffset; }; -} - -#endif // MOUSEEVENT_H +} // namespace Inferno diff --git a/src/inferno/io/file.h b/src/inferno/io/file.h index e6fd617..b431674 100644 --- a/src/inferno/io/file.h +++ b/src/inferno/io/file.h @@ -1,5 +1,4 @@ -#ifndef FILE_H -#define FILE_H +#pragma once #include // std::ifstream, std::ofstream #include // std::setfill, std::setw @@ -60,6 +59,4 @@ namespace Inferno { } }; -} - -#endif // FILE_H +} // namespace Inferno diff --git a/src/inferno/io/gltffile.h b/src/inferno/io/gltffile.h index b24cf2f..c2f3599 100644 --- a/src/inferno/io/gltffile.h +++ b/src/inferno/io/gltffile.h @@ -1,5 +1,4 @@ -#ifndef GLTF_FILE_H -#define GLTF_FILE_H +#pragma once #include // uint32_t #include // std::shared_ptr @@ -18,5 +17,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // GLTF_FILE_H diff --git a/src/inferno/io/input.h b/src/inferno/io/input.h index 138a3d0..07eb075 100644 --- a/src/inferno/io/input.h +++ b/src/inferno/io/input.h @@ -1,5 +1,4 @@ -#ifndef INPUT_H -#define INPUT_H +#pragma once #include // std::pair @@ -34,6 +33,4 @@ namespace Inferno { static float m_yOffset; }; -} - -#endif // INPUT_H +} // namespace Inferno diff --git a/src/inferno/io/log.h b/src/inferno/io/log.h index 32269c4..dee105f 100644 --- a/src/inferno/io/log.h +++ b/src/inferno/io/log.h @@ -1,5 +1,4 @@ -#ifndef LOG_H -#define LOG_H +#pragma once #include // size_t #include // memcpy @@ -222,6 +221,4 @@ namespace Inferno { StringLogStream str(std::string* fill); -} - -#endif // LOG_H +} // namespace Inferno diff --git a/src/inferno/keycodes.h b/src/inferno/keycodes.h index 23b70aa..3c43e73 100644 --- a/src/inferno/keycodes.h +++ b/src/inferno/keycodes.h @@ -1,5 +1,4 @@ -#ifndef INPUTCODES_H -#define INPUTCODES_H +#pragma once #define MAP_KEY(key) #key, key @@ -8,5 +7,3 @@ namespace Inferno { int keyCode(const char* name); } - -#endif // INPUTCODES_H diff --git a/src/inferno/render/buffer.h b/src/inferno/render/buffer.h index a339c7d..a3d019f 100644 --- a/src/inferno/render/buffer.h +++ b/src/inferno/render/buffer.h @@ -1,5 +1,4 @@ -#ifndef BUFFER_H -#define BUFFER_H +#pragma once #include // size_t #include // int32_t, uint32_t @@ -143,6 +142,4 @@ namespace Inferno { std::vector> m_vertexBuffers; std::shared_ptr m_indexBuffer; }; -} - -#endif // BUFFER_H +} // namespace Inferno diff --git a/src/inferno/render/context.h b/src/inferno/render/context.h index 41a8a3e..281829f 100644 --- a/src/inferno/render/context.h +++ b/src/inferno/render/context.h @@ -1,5 +1,4 @@ -#ifndef CONTEXT_H -#define CONTEXT_H +#pragma once struct GLFWwindow; @@ -19,7 +18,4 @@ namespace Inferno { GLFWwindow* m_window { nullptr }; }; -} - - -#endif // CONTEXT_H +} // namespace Inferno diff --git a/src/inferno/render/font.h b/src/inferno/render/font.h index db1b41b..4d3d737 100644 --- a/src/inferno/render/font.h +++ b/src/inferno/render/font.h @@ -1,5 +1,4 @@ -#ifndef FONT_H -#define FONT_H +#pragma once #include // uint32_t #include // std::shared_ptr @@ -75,8 +74,6 @@ namespace Inferno { } // namespace Inferno -#endif // FONT_H - // FontManager fm; // Font f = fm.load("path/to/font"); // Font f2("path/to/font"); diff --git a/src/inferno/render/framebuffer.h b/src/inferno/render/framebuffer.h index f830183..9e2fad5 100644 --- a/src/inferno/render/framebuffer.h +++ b/src/inferno/render/framebuffer.h @@ -1,14 +1,11 @@ -#ifndef FRAMEBUFFER_H -#define FRAMEBUFFER_H +#pragma once namespace Inferno { -class Framebuffer { -public: - Framebuffer(); - virtual ~Framebuffer(); -}; + class Framebuffer { + public: + Framebuffer(); + virtual ~Framebuffer(); + }; } // namespace Inferno - -#endif // FRAMEBUFFER_H diff --git a/src/inferno/render/gltf.h b/src/inferno/render/gltf.h index 7a80ea5..20d5c08 100644 --- a/src/inferno/render/gltf.h +++ b/src/inferno/render/gltf.h @@ -1,5 +1,4 @@ -#ifndef GLTF_H -#define GLTF_H +#pragma once #if 0 #include // uint32_t @@ -169,5 +168,3 @@ namespace Inferno { } // namespace Inferno #endif - -#endif // GLTF_H diff --git a/src/inferno/render/renderer.h b/src/inferno/render/renderer.h index 39aaa07..c1eac98 100644 --- a/src/inferno/render/renderer.h +++ b/src/inferno/render/renderer.h @@ -1,5 +1,4 @@ -#ifndef RENDERER_H -#define RENDERER_H +#pragma once #include // int32_t, uint32_t #include // std::shared_ptr, std::unique_ptr, std::make_shared, std::make_unique @@ -161,5 +160,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // RENDERER_H diff --git a/src/inferno/render/renderer3d.h b/src/inferno/render/renderer3d.h index be94ab7..f1834ce 100644 --- a/src/inferno/render/renderer3d.h +++ b/src/inferno/render/renderer3d.h @@ -19,8 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef RENDERER_3D_H -#define RENDERER_3D_H +#pragma once namespace Inferno { @@ -32,8 +31,6 @@ public: } // namespace Inferno -#endif // RENDERER_3D_H - // - what data do you need? // - gltf // - how are we going to batch diff --git a/src/inferno/render/shader.h b/src/inferno/render/shader.h index e3368ae..68fcfc9 100644 --- a/src/inferno/render/shader.h +++ b/src/inferno/render/shader.h @@ -1,5 +1,4 @@ -#ifndef SHADER_H -#define SHADER_H +#pragma once #include // int32_t, uint32_t #include // std::shared_ptr @@ -70,5 +69,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // SHADER_H diff --git a/src/inferno/render/texture.h b/src/inferno/render/texture.h index 78ff154..22b5184 100644 --- a/src/inferno/render/texture.h +++ b/src/inferno/render/texture.h @@ -1,5 +1,4 @@ -#ifndef TEXTURE_H -#define TEXTURE_H +#pragma once #include // uint32_t #include // std::shared_ptr @@ -57,5 +56,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // TEXTURE_H diff --git a/src/inferno/scene/scene.h b/src/inferno/scene/scene.h index d5befaf..b1bc6a3 100644 --- a/src/inferno/scene/scene.h +++ b/src/inferno/scene/scene.h @@ -1,5 +1,4 @@ -#ifndef SCENE_H -#define SCENE_H +#pragma once #include // uint32_t #include // std::shared_ptr @@ -79,9 +78,7 @@ namespace Inferno { const LogStream& operator<<(const LogStream& stream, entt::entity handle); -} - -#endif // SCENE_H +} // namespace Inferno // @Todo // - Convert registry to stack variable diff --git a/src/inferno/script/cameracontroller.h b/src/inferno/script/cameracontroller.h index 390d2eb..6cc7adf 100644 --- a/src/inferno/script/cameracontroller.h +++ b/src/inferno/script/cameracontroller.h @@ -1,5 +1,4 @@ -#ifndef CAMERA_CONTROLLER_H -#define CAMERA_CONTROLLER_H +#pragma once #include "inferno/component/cameracomponent.h" #include "inferno/script/nativescript.h" @@ -15,7 +14,6 @@ namespace Inferno { class CameraController final : public NativeScript { public: - virtual void update(float deltaTime) override { m_camera = &getComponent(); @@ -35,6 +33,4 @@ namespace Inferno { CameraComponent* m_camera { nullptr }; }; -} - -#endif // CAMERA_CONTROLLER_H +} // namespace Inferno diff --git a/src/inferno/script/luascript.h b/src/inferno/script/luascript.h index 9e52281..f2f9cea 100644 --- a/src/inferno/script/luascript.h +++ b/src/inferno/script/luascript.h @@ -1,5 +1,4 @@ -#ifndef LUA_SCRIPT_H -#define LUA_SCRIPT_H +#pragma once #include // uint32_t #include // std::string @@ -52,6 +51,4 @@ namespace Inferno { friend class ScriptSystem; }; -} - -#endif // LUA_SCRIPT_H +} // namespace Inferno diff --git a/src/inferno/script/nativescript.h b/src/inferno/script/nativescript.h index c655f2c..1a84409 100644 --- a/src/inferno/script/nativescript.h +++ b/src/inferno/script/nativescript.h @@ -1,5 +1,4 @@ -#ifndef NATIVE_SCRIPT_H -#define NATIVE_SCRIPT_H +#pragma once #include "inferno/scene/scene.h" @@ -31,6 +30,4 @@ namespace Inferno { friend class ScriptSystem; }; -} - -#endif // NATIVE_SCRIPT_H +} // namespace Inferno diff --git a/src/inferno/script/registration.h b/src/inferno/script/registration.h index 743bbc1..cffdc2f 100644 --- a/src/inferno/script/registration.h +++ b/src/inferno/script/registration.h @@ -1,5 +1,4 @@ -#ifndef REGISTRATION_H -#define REGISTRATION_H +#pragma once #include "sol/overload.hpp" // sol::overload #include "sol/state_view.hpp" // sol::state_view @@ -66,6 +65,4 @@ namespace Inferno { } }; -} - -#endif // REGISTRATION_H +} // namespace Inferno diff --git a/src/inferno/settings.h b/src/inferno/settings.h index 61cc21e..91b2b45 100644 --- a/src/inferno/settings.h +++ b/src/inferno/settings.h @@ -1,5 +1,4 @@ -#ifndef SETTINGS_H -#define SETTINGS_H +#pragma once #include "ruc/json/json.h" @@ -37,5 +36,3 @@ namespace Inferno { void fromJson(const ruc::Json& object, WindowProperties& window); } // namespace Inferno - -#endif // SETTINGS_H diff --git a/src/inferno/singleton.h b/src/inferno/singleton.h index 53d3fc5..04fcaab 100644 --- a/src/inferno/singleton.h +++ b/src/inferno/singleton.h @@ -1,5 +1,4 @@ -#ifndef SINGLETON_H -#define SINGLETON_H +#pragma once #include "inferno/assert.h" @@ -50,6 +49,3 @@ namespace Inferno { T* Singleton::s_instance = nullptr; } // namespace Inferno - - -#endif // SINGLETON_H diff --git a/src/inferno/system/camerasystem.h b/src/inferno/system/camerasystem.h index 3372936..78be021 100644 --- a/src/inferno/system/camerasystem.h +++ b/src/inferno/system/camerasystem.h @@ -1,5 +1,4 @@ -#ifndef CAMERA_SYSTEM_H -#define CAMERA_SYSTEM_H +#pragma once #include //std::shared_ptr @@ -34,5 +33,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // CAMERA_SYSTEM_H diff --git a/src/inferno/system/rendersystem.h b/src/inferno/system/rendersystem.h index 33e1644..46d26e9 100644 --- a/src/inferno/system/rendersystem.h +++ b/src/inferno/system/rendersystem.h @@ -1,5 +1,4 @@ -#ifndef RENDER_SYSTEM_H -#define RENDER_SYSTEM_H +#pragma once #include //std::shared_ptr @@ -24,5 +23,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // RENDER_SYSTEM_H diff --git a/src/inferno/system/scriptsystem.h b/src/inferno/system/scriptsystem.h index 3823a81..89b13e0 100644 --- a/src/inferno/system/scriptsystem.h +++ b/src/inferno/system/scriptsystem.h @@ -1,5 +1,4 @@ -#ifndef SCRIPT_SYSTEM_H -#define SCRIPT_SYSTEM_H +#pragma once #include // uint32_t @@ -30,5 +29,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // SCRIPT_SYSTEM_H diff --git a/src/inferno/system/textareasystem.h b/src/inferno/system/textareasystem.h index 0e03e07..bbbf7cb 100644 --- a/src/inferno/system/textareasystem.h +++ b/src/inferno/system/textareasystem.h @@ -1,5 +1,4 @@ -#ifndef TEXTAREA_H -#define TEXTAREA_H +#pragma once #include // std::uint32_t #include // std::shared_ptr @@ -34,5 +33,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // TEXTAREA_H diff --git a/src/inferno/system/transformsystem.h b/src/inferno/system/transformsystem.h index 8e164ff..d50b2d9 100644 --- a/src/inferno/system/transformsystem.h +++ b/src/inferno/system/transformsystem.h @@ -1,7 +1,6 @@ -#ifndef TRANSFORM_SYSTEM_H -#define TRANSFORM_SYSTEM_H +#pragma once -#include //std::shared_ptr +#include // std::shared_ptr #include "entt/entity/registry.hpp" // entt::entity, entt::registry #include "ruc/singleton.h" @@ -22,5 +21,3 @@ namespace Inferno { }; } // namespace Inferno - -#endif // TRANSFORM_SYSTEM_H diff --git a/src/inferno/time.h b/src/inferno/time.h index 67bdcbc..78cbdef 100644 --- a/src/inferno/time.h +++ b/src/inferno/time.h @@ -1,5 +1,4 @@ -#ifndef TIME_H -#define TIME_H +#pragma once namespace Inferno { @@ -8,6 +7,4 @@ namespace Inferno { static float time(); }; -} - -#endif // TIME_H +} // namespace Inferno diff --git a/src/inferno/util/integer.h b/src/inferno/util/integer.h index 7df8e70..cd5b1b7 100644 --- a/src/inferno/util/integer.h +++ b/src/inferno/util/integer.h @@ -1,8 +1,7 @@ -#ifndef INTEGER_UTIL_H -#define INTEGER_UTIL_H +#pragma once -#include // std::numeric_limits -#include // std::string, std::stoul +#include // std::numeric_limits +#include // std::string, std::stoul #include "inferno/assert.h" @@ -23,5 +22,3 @@ namespace std { } } // namespace std - -#endif // INTEGER_UTIL_H diff --git a/src/inferno/util/json.h b/src/inferno/util/json.h index 07aa402..7fcdf32 100644 --- a/src/inferno/util/json.h +++ b/src/inferno/util/json.h @@ -1,5 +1,4 @@ -#ifndef JSON_UTIL_H -#define JSON_UTIL_H +#pragma once #if 0 #include // int32_t, uint32_t @@ -249,8 +248,6 @@ namespace Inferno { } // namespace Inferno #endif -#endif // JSON_UTIL_H - // JSON syntax: // [ ] = std::map, array (ordered) // { } = std::vector, object (unordered) diff --git a/src/inferno/util/string.h b/src/inferno/util/string.h index 2dd0c40..6c5cb10 100644 --- a/src/inferno/util/string.h +++ b/src/inferno/util/string.h @@ -1,5 +1,4 @@ -#ifndef STRING_UTIL_H -#define STRING_UTIL_H +#pragma once #include // std::setfill, std::setw #include // std::stringstream @@ -18,5 +17,3 @@ namespace Inferno { } } // namespace Inferno - -#endif // STRING_UTIL_H diff --git a/src/inferno/window.h b/src/inferno/window.h index 5a9243d..d84da8d 100644 --- a/src/inferno/window.h +++ b/src/inferno/window.h @@ -1,5 +1,4 @@ -#ifndef WINDOW_H -#define WINDOW_H +#pragma once #include // uint32_t #include // std::function @@ -61,6 +60,4 @@ namespace Inferno { static unsigned char s_windowCount; }; -} - -#endif // WINDOW_H +} // namespace Inferno