From ea39f5aa7f125ac921b893d0c555bb7988b6f341 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 6 Feb 2024 12:05:13 +0100 Subject: random cleanup --- compat/prelude.hpp | 4 +++- loader/ground-atlas.cpp | 2 ++ serialize/savegame.cpp | 6 +++--- src/chunk.cpp | 2 ++ src/dijkstra.cpp | 1 - 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/compat/prelude.hpp b/compat/prelude.hpp index bb5c4da0..5a33e2e9 100644 --- a/compat/prelude.hpp +++ b/compat/prelude.hpp @@ -1,8 +1,9 @@ #pragma once #include "integer-types.hpp" #include -#include +#include #include +#include #include // todo add colors prefix thing @@ -41,4 +42,5 @@ namespace floormat { using Debug [[maybe_unused]] = ::Corrade::Utility::Debug; using Error [[maybe_unused]] = ::Corrade::Utility::Error; namespace Path = Corrade::Utility::Path; // NOLINT(misc-unused-alias-decls) + constexpr inline InPlaceInitT InPlace = InPlaceInit; } // namespace floormat diff --git a/loader/ground-atlas.cpp b/loader/ground-atlas.cpp index 974d6fa8..43fb2e7a 100644 --- a/loader/ground-atlas.cpp +++ b/loader/ground-atlas.cpp @@ -63,6 +63,7 @@ std::shared_ptr loader_impl::ground_atlas(StringView name, l case loader_policy::ignore: goto missing_ok; } + fm_assert(false); std::unreachable(); } else if (!it->second->atlas) @@ -81,6 +82,7 @@ std::shared_ptr loader_impl::ground_atlas(StringView name, l case loader_policy::ignore: goto missing_ok; } + fm_assert(false); std::unreachable(); } diff --git a/serialize/savegame.cpp b/serialize/savegame.cpp index 4f5d2025..bf393b0b 100644 --- a/serialize/savegame.cpp +++ b/serialize/savegame.cpp @@ -27,11 +27,11 @@ #include #include -#if 1 #ifdef __CLION_IDE__ +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma ide diagnostic ignored "cppcoreguidelines-missing-std-forward" #undef fm_assert -#define fm_assert(...) (void)(__VA_ARGS__) -#endif +#define fm_assert(...) void(bool((__VA_ARGS__))) #endif namespace floormat { diff --git a/src/chunk.cpp b/src/chunk.cpp index cc8eb3f6..4963a9e7 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -15,6 +15,7 @@ constexpr auto object_id_lessp = [](const auto& a, const auto& b) { return a->id size_t _reload_no_ = 0; // NOLINT +[[maybe_unused]] bool is_log_quiet() { using GLCCF = GL::Implementation::ContextConfigurationFlag; @@ -29,6 +30,7 @@ bool is_log_verbose() return !!(flags & GLCCF::VerboseLog); } +[[maybe_unused]] bool is_log_standard() { using GLCCF = GL::Implementation::ContextConfigurationFlag; diff --git a/src/dijkstra.cpp b/src/dijkstra.cpp index c1dcd4d6..d303960a 100644 --- a/src/dijkstra.cpp +++ b/src/dijkstra.cpp @@ -1,6 +1,5 @@ #include "path-search.hpp" #include "compat/format.hpp" -#include "compat/debug.hpp" #include "compat/vector-wrapper.hpp" #include "compat/heap.hpp" #include "object.hpp" -- cgit v1.2.3