style: move public members first in class declarations

- Reorder all class headers to put public interface before private members
- Document convention in AGENTS.md
This commit is contained in:
2026-05-05 22:30:56 +02:00
parent e71c4d55cf
commit b6adb7c23a
8 changed files with 34 additions and 26 deletions
+9 -8
View File
@@ -8,14 +8,6 @@
namespace cbt::opengl {
class context {
GLFWwindow* m_window = nullptr;
bool m_initialized = false;
static auto init() -> bool;
static auto terminate() -> void;
static auto setup_gl() -> bool;
static auto print_info() -> void;
public:
explicit context(std::string title, int width, int height);
~context();
@@ -25,6 +17,15 @@ public:
auto swap_buffers() -> void;
auto poll_events() -> void;
auto raw() const -> GLFWwindow*;
private:
GLFWwindow* m_window = nullptr;
bool m_initialized = false;
static auto init() -> bool;
static auto terminate() -> void;
static auto setup_gl() -> bool;
static auto print_info() -> void;
};
}