replace include guards with pragma once

This commit is contained in:
MihailRis
2024-08-10 01:57:59 +03:00
parent f43cc93cd2
commit de5c75d782
164 changed files with 166 additions and 656 deletions
+2 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_ATLAS_HPP_
#define GRAPHICS_CORE_ATLAS_HPP_
#pragma once
#include <set>
#include <string>
@@ -7,6 +6,7 @@
#include <vector>
#include <optional>
#include <unordered_map>
#include "maths/UVRegion.hpp"
#include "typedefs.hpp"
@@ -59,5 +59,3 @@ public:
/// @param maxResolution max atlas resolution
std::unique_ptr<Atlas> build(uint extrusion, bool prepare=true, uint maxResolution=0);
};
#endif // GRAPHICS_CORE_ATLAS_HPP_
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_BATCH2D_HPP_
#define GRAPHICS_CORE_BATCH2D_HPP_
#pragma once
#include <memory>
#include <stdlib.h>
@@ -93,5 +92,3 @@ public:
void lineWidth(float width);
};
#endif // GRAPHICS_CORE_BATCH2D_HPP_
+1 -4
View File
@@ -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_
+1 -4
View File
@@ -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_
+1 -4
View File
@@ -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_
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_FONT_HPP_
#define GRAPHICS_CORE_FONT_HPP_
#pragma once
#include <memory>
#include <string>
@@ -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_
+1 -4
View File
@@ -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_
+1 -4
View File
@@ -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<GLTexture> from(const ImageData* image);
};
#endif // GRAPHICS_CORE_GLTEXTURE_HPP_
+1 -4
View File
@@ -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<ImageData> add_atlas_margins(ImageData* image, int grid_size);
#endif // GRAPHICS_CORE_IMAGE_DATA_HPP_
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_LINEBATCH_HPP_
#define GRAPHICS_CORE_LINEBATCH_HPP_
#pragma once
#include <memory>
#include <stdlib.h>
@@ -34,5 +33,3 @@ public:
void flush() override;
void lineWidth(float width);
};
#endif // GRAPHICS_CORE_LINEBATCH_HPP_
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_MESH_HPP_
#define GRAPHICS_CORE_MESH_HPP_
#pragma once
#include <stdlib.h>
#include "typedefs.hpp"
@@ -39,5 +38,3 @@ public:
static int meshesCount;
static int drawCalls;
};
#endif // GRAPHICS_CORE_MESH_HPP_
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_MODEL_HPP_
#define GRAPHICS_CORE_MODEL_HPP_
#pragma once
#include <string>
#include <vector>
@@ -34,5 +33,3 @@ namespace model {
void clean();
};
}
#endif // GRAPHICS_CORE_MODEL_HPP_
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_POST_PROCESSING_HPP_
#define GRAPHICS_CORE_POST_PROCESSING_HPP_
#pragma once
#include <memory>
@@ -37,5 +36,3 @@ public:
Framebuffer* getFramebuffer() const;
};
#endif // GRAPHICS_CORE_POST_PROCESSING_HPP_
+1 -4
View File
@@ -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_
+1 -4
View File
@@ -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<Texture> from(const ImageData* image);
};
#endif // GRAPHICS_CORE_TEXTURE_HPP_
+1 -4
View File
@@ -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<TextureAnimation> animations;
};
#endif // GRAPHICS_CORE_TEXTURE_ANIMATION_HPP_
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef GRAPHICS_CORE_VIEWPORT_HPP_
#define GRAPHICS_CORE_VIEWPORT_HPP_
#pragma once
#include <glm/glm.hpp>
@@ -18,5 +17,3 @@ public:
return glm::ivec2(width, height);
}
};
#endif // GRAPHICS_VIEWPORT_HPP_
+1 -4
View File
@@ -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_
+1 -4
View File
@@ -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<int>(primitive)];
}
}
#endif // GRAPHICS_CORE_GL_UTIL_HPP_