From 18a76c2a4a6247ef9d18de157f5dba391d8ff244 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 29 Apr 2023 19:09:36 +0100 Subject: Reformat with new clang-format 16 --- game/terrain.cpp | 4 ++-- gfx/gl/camera.cpp | 8 ++++---- lib/collections.h | 14 +++++++------- lib/stream_support.h | 4 ++-- ui/gameMainWindow.cpp | 8 ++++---- ui/window.cpp | 7 +++---- 6 files changed, 22 insertions(+), 23 deletions(-) diff --git a/game/terrain.cpp b/game/terrain.cpp index 1753dfe..f3bec1e 100644 --- a/game/terrain.cpp +++ b/game/terrain.cpp @@ -19,8 +19,8 @@ #include Terrain::Terrain(std::shared_ptr gd) : - geoData {std::move(gd)}, grass {Texture::cachedTexture.get("grass.png")}, water {Texture::cachedTexture.get( - "water.png")} + geoData {std::move(gd)}, grass {Texture::cachedTexture.get("grass.png")}, + water {Texture::cachedTexture.get("water.png")} { generateMeshes(); } diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp index f642423..c4c9544 100644 --- a/gfx/gl/camera.cpp +++ b/gfx/gl/camera.cpp @@ -6,10 +6,10 @@ #include Camera::Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar) : - position {pos}, forward {::north}, up {::up}, near {zNear}, far {zFar}, projection {glm::perspective( - fov, aspect, zNear, zFar)}, - viewProjection {projection * glm::lookAt(position, position + forward, up)}, inverseViewProjection { - glm::inverse(viewProjection)} + position {pos}, forward {::north}, up {::up}, near {zNear}, far {zFar}, + projection {glm::perspective(fov, aspect, zNear, zFar)}, + viewProjection {projection * glm::lookAt(position, position + forward, up)}, + inverseViewProjection {glm::inverse(viewProjection)} { } diff --git a/lib/collections.h b/lib/collections.h index 8f5a43d..7d78ef9 100644 --- a/lib/collections.h +++ b/lib/collections.h @@ -8,13 +8,13 @@ template concept SequentialCollection = requires(T c) { - { - c.size() - } -> std::integral; - { - c.data() - } -> std::same_as; - }; + { + c.size() + } -> std::integral; + { + c.data() + } -> std::same_as; +}; template concept IterableCollection = std::is_same_v().begin()), decltype(std::declval().end())>; diff --git a/lib/stream_support.h b/lib/stream_support.h index 7fb256c..fa536f1 100644 --- a/lib/stream_support.h +++ b/lib/stream_support.h @@ -11,8 +11,8 @@ template concept stringlike = requires(const S & s) { s.substr(0); }; template -concept spanable = std::is_constructible_v, T> && ! -stringlike && !std::is_same_v, T>; +concept spanable = std::is_constructible_v, T> && !stringlike + && !std::is_same_v, T>; namespace std { template diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp index 30cdada..a7f17dc 100644 --- a/ui/gameMainWindow.cpp +++ b/ui/gameMainWindow.cpp @@ -20,10 +20,10 @@ class GameMainToolbar : Mode, public Toolbar { public: explicit GameMainToolbar(GameMainSelector * gms_) : - Mode {gms_->target}, Toolbar { - {"ui/icon/network.png", - toggle>()}, - } + Mode {gms_->target}, + Toolbar { + {"ui/icon/network.png", toggle>()}, + } { } }; diff --git a/ui/window.cpp b/ui/window.cpp index ad071bb..731996a 100644 --- a/ui/window.cpp +++ b/ui/window.cpp @@ -20,10 +20,9 @@ Window::GlewInitHelper::GlewInitHelper() } Window::Window(size_t width, size_t height, const std::string & title, Uint32 flags) : - size {static_cast(width), static_cast(height)}, m_window {title.c_str(), - static_cast(SDL_WINDOWPOS_CENTERED), - static_cast(SDL_WINDOWPOS_CENTERED), size.x, - size.y, flags}, + size {static_cast(width), static_cast(height)}, + m_window {title.c_str(), static_cast(SDL_WINDOWPOS_CENTERED), static_cast(SDL_WINDOWPOS_CENTERED), size.x, + size.y, flags}, glContext {m_window}, uiShader {width, height} { } -- cgit v1.2.3