summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-06 12:05:13 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-06 21:40:39 +0100
commitea39f5aa7f125ac921b893d0c555bb7988b6f341 (patch)
treea71a46600fdf3bd2e8145bb1fd880642ceb5f03b
parent05c67aac26d6042454e5d0503acdb11b2c667176 (diff)
random cleanup
-rw-r--r--compat/prelude.hpp4
-rw-r--r--loader/ground-atlas.cpp2
-rw-r--r--serialize/savegame.cpp6
-rw-r--r--src/chunk.cpp2
-rw-r--r--src/dijkstra.cpp1
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 <type_traits>
-#include <Corrade/Containers/Containers.h>
+#include <Corrade/Tags.h>
#include <Corrade/Utility/Macros.h>
+#include <Corrade/Containers/Containers.h>
#include <Magnum/Magnum.h>
// 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<class ground_atlas> 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<class ground_atlas> 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 <Corrade/Utility/Path.h>
#include <tsl/robin_map.h>
-#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"