Reformat.

This commit is contained in:
Pcornat 2024-01-28 20:31:50 +01:00
parent 7d1a0473ff
commit 2755f4827e
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD
24 changed files with 6140 additions and 5829 deletions

View file

@ -7,28 +7,29 @@
#include <memory>
namespace gui {
class Window final {
private:
static void delete_glfw_window(GLFWwindow *glfWwindow) {
glfwDestroyWindow(glfWwindow);
glfwTerminate();
}
class Window final {
private:
static void delete_glfw_window(GLFWwindow *glfWwindow) {
glfwDestroyWindow(glfWwindow);
glfwTerminate();
}
std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)> wwindow{ nullptr, delete_glfw_window };
std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)> wwindow{ nullptr, delete_glfw_window };
public:
Window();
public:
Window();
Window(Window &&window) noexcept: wwindow(std::move(window.wwindow)) {}
Window(Window &&window) noexcept: wwindow(std::move(window.wwindow)) {}
~Window() noexcept = default;
~Window() noexcept = default;
[[nodiscard]] const std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)> &get_window() const { return wwindow; }
[[nodiscard]] const std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)> &
get_window() const { return wwindow; }
[[nodiscard]] bool should_close() const noexcept;
[[nodiscard]] bool should_close() const noexcept;
void swap_buffers() const noexcept;
};
void swap_buffers() const noexcept;
};
}