From b8c538bcdfdcc7f2739934ea96fe98ae61b565dc Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 10 Feb 2024 22:27:12 +0100 Subject: style fix --- loader/anim-cell.cpp | 0 loader/ground-traits.cpp | 6 ++---- loader/impl.cpp | 4 ---- loader/loader.cpp | 3 +-- loader/wall-traits.cpp | 7 +++---- src/tile-image.hpp | 4 ++++ 6 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 loader/anim-cell.cpp diff --git a/loader/anim-cell.cpp b/loader/anim-cell.cpp deleted file mode 100644 index e69de29b..00000000 diff --git a/loader/ground-traits.cpp b/loader/ground-traits.cpp index 14f30623..61df7831 100644 --- a/loader/ground-traits.cpp +++ b/loader/ground-traits.cpp @@ -1,12 +1,11 @@ #include "ground-traits.hpp" -#include "compat/assert.hpp" -#include "compat/exception.hpp" -#include "compat/vector-wrapper.hpp" #include "atlas-loader-storage.hpp" #include "ground-cell.hpp" #include "loader.hpp" #include "src/tile-defs.hpp" #include "src/ground-atlas.hpp" +#include "compat/assert.hpp" +#include "compat/vector-wrapper.hpp" #include #include #include @@ -16,7 +15,6 @@ namespace floormat::loader_detail { using ground_traits = atlas_loader_traits; - StringView ground_traits::loader_name() { return "ground_atlas"_s; } auto ground_traits::atlas_of(const Cell& x) -> const std::shared_ptr& { return x.atlas; } auto ground_traits::atlas_of(Cell& x) -> std::shared_ptr& { return x.atlas; } diff --git a/loader/impl.cpp b/loader/impl.cpp index 12b71a9b..1d758c4e 100644 --- a/loader/impl.cpp +++ b/loader/impl.cpp @@ -15,10 +15,6 @@ #include "atlas-loader.hpp" #include "atlas-loader-storage.hpp" -#ifdef __GNUG__ -#pragma GCC diagnostic ignored "-Walloca" -#endif - namespace floormat { } // namespace floormat diff --git a/loader/loader.cpp b/loader/loader.cpp index 1820b3e7..1e69a0c0 100644 --- a/loader/loader.cpp +++ b/loader/loader.cpp @@ -14,8 +14,7 @@ loader_& loader_::default_loader() noexcept return loader_singleton; } -// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) -loader_& loader = loader_::default_loader(); +loader_& loader = loader_::default_loader(); // NOLINT(*-avoid-non-const-global-variables) loader_::loader_() = default; loader_::~loader_() noexcept = default; diff --git a/loader/wall-traits.cpp b/loader/wall-traits.cpp index ac9f1a7a..d31aba4e 100644 --- a/loader/wall-traits.cpp +++ b/loader/wall-traits.cpp @@ -1,11 +1,11 @@ #include "wall-traits.hpp" -#include "compat/exception.hpp" -#include "compat/vector-wrapper.hpp" #include "atlas-loader-storage.hpp" #include "wall-cell.hpp" #include "loader.hpp" #include "src/tile-defs.hpp" #include "src/wall-atlas.hpp" +#include "compat/exception.hpp" +#include "compat/vector-wrapper.hpp" #include #include #include @@ -14,7 +14,6 @@ namespace floormat::loader_detail { -namespace { const auto placeholder_cell = wall_cell{}; } using wall_traits = atlas_loader_traits; StringView wall_traits::loader_name() { return "wall_atlas"_s; } auto wall_traits::atlas_of(const Cell& x) -> const std::shared_ptr& { return x.atlas; } @@ -77,9 +76,9 @@ auto wall_traits::make_atlas(StringView name, const Cell&) -> std::shared_ptr(std::move(def), file, tex); return atlas; } diff --git a/src/tile-image.hpp b/src/tile-image.hpp index 7292c5f0..a25b9fed 100644 --- a/src/tile-image.hpp +++ b/src/tile-image.hpp @@ -32,8 +32,12 @@ struct image_ref_ final using tile_image_proto = image_proto_; using tile_image_ref = image_ref_; +extern template struct image_proto_; +extern template struct image_ref_; using wall_image_proto = image_proto_; using wall_image_ref = image_ref_; +extern template struct image_proto_; +extern template struct image_ref_; } // namespace floormat -- cgit v1.2.3