From a337c9394bc03f65871e0c6b8dde87548f0b5341 Mon Sep 17 00:00:00 2001 From: Huseyn Ismayilov Date: Thu, 22 Aug 2024 20:04:15 +0400 Subject: [PATCH] refactor(close #9): Change include guards with #pragma once --- editor/include/Editor.h | 7 ++----- engine/include/Engine.h | 7 ++----- engine/include/FrameBuffer.h | 7 ++----- engine/include/Renderer.h | 7 ++----- engine/include/Shader.h | 7 ++----- engine/include/Texture.h | 7 ++----- engine/include/UI.h | 7 ++----- engine/include/VertexArray.h | 7 ++----- engine/include/VertexBuffer.h | 7 ++----- engine/include/Window.h | 7 ++----- 10 files changed, 20 insertions(+), 50 deletions(-) diff --git a/editor/include/Editor.h b/editor/include/Editor.h index cf1f329..8d99e8f 100644 --- a/editor/include/Editor.h +++ b/editor/include/Editor.h @@ -1,5 +1,4 @@ -#ifndef EDITOR_H -#define EDITOR_H +#pragma once #define GLFW_INCLUDE_NONE #include "Engine.h" @@ -17,6 +16,4 @@ public: private: void InitializeImGui(); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/engine/include/Engine.h b/engine/include/Engine.h index 7a542a0..b5d6341 100644 --- a/engine/include/Engine.h +++ b/engine/include/Engine.h @@ -1,5 +1,4 @@ -#ifndef ENGINE_H -#define ENGINE_H +#pragma once #define GLFW_INCLUDE_NONE #include @@ -24,6 +23,4 @@ public: private: Window* m_Window; static Engine* s_Instance; -}; - -#endif +}; \ No newline at end of file diff --git a/engine/include/FrameBuffer.h b/engine/include/FrameBuffer.h index 5b885e8..5afd24c 100644 --- a/engine/include/FrameBuffer.h +++ b/engine/include/FrameBuffer.h @@ -1,5 +1,4 @@ -#ifndef FRAMEBUFFER_H -#define FRAMEBUFFER_H +#pragma once #include #include @@ -25,6 +24,4 @@ public: private: unsigned int m_FBO{}, m_RBO{}; Texture* m_Texture; -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/engine/include/Renderer.h b/engine/include/Renderer.h index 9ef5430..c90b549 100644 --- a/engine/include/Renderer.h +++ b/engine/include/Renderer.h @@ -1,5 +1,4 @@ -#ifndef RENDERER_H -#define RENDERER_H +#pragma once #define GLFW_INCLUDE_NONE #include @@ -39,6 +38,4 @@ private: static void LoadShaders(); static void SetupBuffers(); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/engine/include/Shader.h b/engine/include/Shader.h index cf4670e..b6cbdcd 100644 --- a/engine/include/Shader.h +++ b/engine/include/Shader.h @@ -1,5 +1,4 @@ -#ifndef SHADER_H -#define SHADER_H +#pragma once #define GLFW_INCLUDE_NONE #include @@ -31,6 +30,4 @@ public: private: unsigned int m_ID; -}; - -#endif +}; \ No newline at end of file diff --git a/engine/include/Texture.h b/engine/include/Texture.h index ef9f657..875abb4 100644 --- a/engine/include/Texture.h +++ b/engine/include/Texture.h @@ -1,5 +1,4 @@ -#ifndef TEXTURE_H -#define TEXTURE_H +#pragma once #include #include @@ -30,6 +29,4 @@ private: unsigned int m_Texture{}; unsigned char* m_Data{}; int m_Width{}, m_Height{}, m_NrChannels{}; -}; - -#endif +}; \ No newline at end of file diff --git a/engine/include/UI.h b/engine/include/UI.h index 7bde453..a18ce90 100644 --- a/engine/include/UI.h +++ b/engine/include/UI.h @@ -1,5 +1,4 @@ -#ifndef UI_H -#define UI_H +#pragma once #define GLFW_INCLUDE_NONE #include "FrameBuffer.h" @@ -38,6 +37,4 @@ public: private: static InspectorData s_Data; -}; - -#endif +}; \ No newline at end of file diff --git a/engine/include/VertexArray.h b/engine/include/VertexArray.h index 2399604..a25ab88 100644 --- a/engine/include/VertexArray.h +++ b/engine/include/VertexArray.h @@ -1,5 +1,4 @@ -#ifndef VERTEXARRAY_H -#define VERTEXARRAY_H +#pragma once #include @@ -17,6 +16,4 @@ public: private: unsigned int m_VAO{}; -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/engine/include/VertexBuffer.h b/engine/include/VertexBuffer.h index af49706..6a39801 100644 --- a/engine/include/VertexBuffer.h +++ b/engine/include/VertexBuffer.h @@ -1,5 +1,4 @@ -#ifndef VERTEXBUFFER_H -#define VERTEXBUFFER_H +#pragma once #include @@ -18,6 +17,4 @@ public: private: unsigned int m_VBO{}; -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/engine/include/Window.h b/engine/include/Window.h index aea731c..de758b0 100644 --- a/engine/include/Window.h +++ b/engine/include/Window.h @@ -1,5 +1,4 @@ -#ifndef WINDOW_H -#define WINDOW_H +#pragma once #include #include @@ -39,6 +38,4 @@ public: private: GLFWwindow* m_Window{}; WindowData m_Data; -}; - -#endif \ No newline at end of file +}; \ No newline at end of file