refactor(close #9): Change include guards with #pragma once

This commit is contained in:
Huseyn Ismayilov 2024-08-22 20:04:15 +04:00
parent 5fceafd553
commit a337c9394b
10 changed files with 20 additions and 50 deletions

View File

@ -1,5 +1,4 @@
#ifndef EDITOR_H #pragma once
#define EDITOR_H
#define GLFW_INCLUDE_NONE #define GLFW_INCLUDE_NONE
#include "Engine.h" #include "Engine.h"
@ -17,6 +16,4 @@ public:
private: private:
void InitializeImGui(); void InitializeImGui();
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef ENGINE_H #pragma once
#define ENGINE_H
#define GLFW_INCLUDE_NONE #define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
@ -24,6 +23,4 @@ public:
private: private:
Window* m_Window; Window* m_Window;
static Engine* s_Instance; static Engine* s_Instance;
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef FRAMEBUFFER_H #pragma once
#define FRAMEBUFFER_H
#include <glad/glad.h> #include <glad/glad.h>
#include <iostream> #include <iostream>
@ -25,6 +24,4 @@ public:
private: private:
unsigned int m_FBO{}, m_RBO{}; unsigned int m_FBO{}, m_RBO{};
Texture* m_Texture; Texture* m_Texture;
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef RENDERER_H #pragma once
#define RENDERER_H
#define GLFW_INCLUDE_NONE #define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
@ -39,6 +38,4 @@ private:
static void LoadShaders(); static void LoadShaders();
static void SetupBuffers(); static void SetupBuffers();
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef SHADER_H #pragma once
#define SHADER_H
#define GLFW_INCLUDE_NONE #define GLFW_INCLUDE_NONE
#include <glad/glad.h> #include <glad/glad.h>
@ -31,6 +30,4 @@ public:
private: private:
unsigned int m_ID; unsigned int m_ID;
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef TEXTURE_H #pragma once
#define TEXTURE_H
#include <glad/glad.h> #include <glad/glad.h>
#include <stb_image.h> #include <stb_image.h>
@ -30,6 +29,4 @@ private:
unsigned int m_Texture{}; unsigned int m_Texture{};
unsigned char* m_Data{}; unsigned char* m_Data{};
int m_Width{}, m_Height{}, m_NrChannels{}; int m_Width{}, m_Height{}, m_NrChannels{};
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef UI_H #pragma once
#define UI_H
#define GLFW_INCLUDE_NONE #define GLFW_INCLUDE_NONE
#include "FrameBuffer.h" #include "FrameBuffer.h"
@ -38,6 +37,4 @@ public:
private: private:
static InspectorData s_Data; static InspectorData s_Data;
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef VERTEXARRAY_H #pragma once
#define VERTEXARRAY_H
#include <glad/glad.h> #include <glad/glad.h>
@ -17,6 +16,4 @@ public:
private: private:
unsigned int m_VAO{}; unsigned int m_VAO{};
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef VERTEXBUFFER_H #pragma once
#define VERTEXBUFFER_H
#include <glad/glad.h> #include <glad/glad.h>
@ -18,6 +17,4 @@ public:
private: private:
unsigned int m_VBO{}; unsigned int m_VBO{};
}; };
#endif

View File

@ -1,5 +1,4 @@
#ifndef WINDOW_H #pragma once
#define WINDOW_H
#include <glad/glad.h> #include <glad/glad.h>
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
@ -39,6 +38,4 @@ public:
private: private:
GLFWwindow* m_Window{}; GLFWwindow* m_Window{};
WindowData m_Data; WindowData m_Data;
}; };
#endif