summaryrefslogtreecommitdiffhomepage
path: root/loader/loader-impl.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-07 11:45:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-07 11:47:59 +0100
commit9e390f58ea6e4c50d7ba104c5fe3ad97f74fe6f0 (patch)
tree4d9547daaf8b022751ad6d145e7aa063e7753c1e /loader/loader-impl.cpp
parentee719a7c12733e5f4507227ee8f0fd50b9727a31 (diff)
a
Diffstat (limited to 'loader/loader-impl.cpp')
-rw-r--r--loader/loader-impl.cpp5
1 files changed, 3 insertions, 2 deletions
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 <optional>
#include <Corrade/Containers/ArrayViewStl.h>
#include <Corrade/Containers/StringView.h>
-#include <Corrade/Containers/StringStlView.h>
#include <Corrade/Containers/StringStlHash.h>
+#include <Corrade/Containers/StringStlView.h>
#include <Corrade/PluginManager/PluginManager.h>
#include <Corrade/Utility/Resource.h>
#include <Corrade/Utility/Path.h>
@@ -85,7 +85,8 @@ std::shared_ptr<tile_atlas> loader_impl::tile_atlas(StringView name, Vector2ub s
template<std::size_t N>
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());