From 9e390f58ea6e4c50d7ba104c5fe3ad97f74fe6f0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 7 Nov 2022 11:45:43 +0100 Subject: a --- editor/tile-editor.cpp | 1 - loader/loader-impl.cpp | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp index 4773f6bf..8df82609 100644 --- a/editor/tile-editor.cpp +++ b/editor/tile-editor.cpp @@ -6,7 +6,6 @@ #include "random.hpp" #include "serialize/json-helper.hpp" #include "serialize/tile-atlas.hpp" -#include namespace floormat { diff --git a/loader/loader-impl.cpp b/loader/loader-impl.cpp index fe1f2f12..e782314c 100644 --- a/loader/loader-impl.cpp +++ b/loader/loader-impl.cpp @@ -11,8 +11,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -85,7 +85,8 @@ std::shared_ptr loader_impl::tile_atlas(StringView name, Vector2ub s template Trade::ImageData2D loader_impl::texture(const char(&prefix)[N], StringView filename_) { - fm_assert(N <= 2 || prefix[N-2] == '/'); + if constexpr(N > 1) + fm_assert(prefix[N-2] == '/'); fm_assert(filename_.size() < 4096); fm_assert(filename_.find('\\') == filename_.end()); fm_assert(filename_.find('\0') == filename_.end()); -- cgit v1.2.3