From 40ae94788ee593ede2c213ff2d7809c9f4287587 Mon Sep 17 00:00:00 2001 From: portersky <24420859+portersky@users.noreply.github.com> Date: Tue, 5 May 2026 22:40:51 +0200 Subject: [PATCH] style: fix include ordering across all source files - C++ std headers first, then third-party, then local - Apply consistently in cbt/ and scenes/ --- cbt/opengl/buffer.cpp | 4 ++-- cbt/opengl/context.cpp | 11 +++++------ cbt/opengl/descriptor.cpp | 4 ++-- cbt/opengl/descriptor.hpp | 6 +++--- cbt/opengl/shader.cpp | 4 ++-- cbt/opengl/texture.cpp | 4 ++-- cuber.cpp | 10 +++++----- scenes/cube.cpp | 9 ++++----- scenes/cube.hpp | 9 +++++---- 9 files changed, 30 insertions(+), 31 deletions(-) diff --git a/cbt/opengl/buffer.cpp b/cbt/opengl/buffer.cpp index 38fa22e..25e6e6b 100644 --- a/cbt/opengl/buffer.cpp +++ b/cbt/opengl/buffer.cpp @@ -1,7 +1,7 @@ -#include "cbt/opengl/buffer.hpp" - #include "glad/glad.h" +#include "cbt/opengl/buffer.hpp" + namespace cbt::opengl { buffer::buffer() { diff --git a/cbt/opengl/context.cpp b/cbt/opengl/context.cpp index 04adf10..47c692e 100644 --- a/cbt/opengl/context.cpp +++ b/cbt/opengl/context.cpp @@ -1,12 +1,11 @@ -#define GLFW_INCLUDE_NONE -#include "GLFW/glfw3.h" - -#include "cbt/opengl/context.hpp" - #include -#include "glad/glad.h" +#define GLFW_INCLUDE_NONE +#include "GLFW/glfw3.h" #include "fmt/std.h" +#include "glad/glad.h" + +#include "cbt/opengl/context.hpp" namespace cbt::opengl { diff --git a/cbt/opengl/descriptor.cpp b/cbt/opengl/descriptor.cpp index 2b56b47..09c5521 100644 --- a/cbt/opengl/descriptor.cpp +++ b/cbt/opengl/descriptor.cpp @@ -1,7 +1,7 @@ -#include "cbt/opengl/descriptor.hpp" - #include "glad/glad.h" +#include "cbt/opengl/descriptor.hpp" + namespace cbt::opengl { descriptor_set::descriptor_set() {} diff --git a/cbt/opengl/descriptor.hpp b/cbt/opengl/descriptor.hpp index f147247..413f43c 100644 --- a/cbt/opengl/descriptor.hpp +++ b/cbt/opengl/descriptor.hpp @@ -1,12 +1,12 @@ #pragma once -#include "cbt/opengl/buffer.hpp" -#include "cbt/opengl/texture.hpp" - #include #include #include +#include "cbt/opengl/buffer.hpp" +#include "cbt/opengl/texture.hpp" + namespace cbt::opengl { struct descriptor_binding { diff --git a/cbt/opengl/shader.cpp b/cbt/opengl/shader.cpp index b78098d..a690139 100644 --- a/cbt/opengl/shader.cpp +++ b/cbt/opengl/shader.cpp @@ -1,10 +1,10 @@ -#include "cbt/opengl/shader.hpp" - #include #include #include "fmt/std.h" +#include "cbt/opengl/shader.hpp" + namespace cbt::opengl { shader::shader() {} diff --git a/cbt/opengl/texture.cpp b/cbt/opengl/texture.cpp index 6a494d5..93c65d5 100644 --- a/cbt/opengl/texture.cpp +++ b/cbt/opengl/texture.cpp @@ -1,7 +1,7 @@ -#include "cbt/opengl/texture.hpp" - #include "glad/glad.h" +#include "cbt/opengl/texture.hpp" + namespace cbt::opengl { texture::texture() { diff --git a/cuber.cpp b/cuber.cpp index 1aba07f..3d5ec14 100644 --- a/cuber.cpp +++ b/cuber.cpp @@ -1,12 +1,12 @@ #define GLFW_INCLUDE_NONE -#include "GLFW/glfw3.h" - -#include "cbt/opengl/context.hpp" -#include "scenes/cube.hpp" #include -#include +#include "GLFW/glfw3.h" +#include "asio.hpp" + +#include "cbt/opengl/context.hpp" +#include "scenes/cube.hpp" auto main(int, char const*[]) -> int { auto ctx = cbt::opengl::context("cuber", 1280, 720); diff --git a/scenes/cube.cpp b/scenes/cube.cpp index 0867ce7..cf20214 100644 --- a/scenes/cube.cpp +++ b/scenes/cube.cpp @@ -1,11 +1,10 @@ -#include "scenes/cube.hpp" - #include -#include -#include - #include "glad/glad.h" +#include "glm/gtc/matrix_transform.hpp" +#include "glm/gtc/type_ptr.hpp" + +#include "scenes/cube.hpp" namespace cbt::scenes { diff --git a/scenes/cube.hpp b/scenes/cube.hpp index 66069d9..923de66 100644 --- a/scenes/cube.hpp +++ b/scenes/cube.hpp @@ -1,13 +1,14 @@ #pragma once +#include + +#include "glm/glm.hpp" + #include "cbt/scene.hpp" - -#include "cbt/opengl/shader.hpp" #include "cbt/opengl/buffer.hpp" +#include "cbt/opengl/shader.hpp" #include "cbt/opengl/vao.hpp" -#include - namespace cbt::scenes { class cube final : public scene {