summaryrefslogtreecommitdiffhomepage
path: root/loader/texture.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-05-26 15:30:15 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-05-26 15:30:15 +0200
commit82ab34aa83463179339eb8382edf1c22cacdad61 (patch)
tree3d02aaa7458a4f00e38527c7cfe0f8559398b5d5 /loader/texture.cpp
parentc3bebd8c3263d67f3b66cab7437bc24f5ea724c8 (diff)
use array_size instead of std::size/arraySize
Diffstat (limited to 'loader/texture.cpp')
-rw-r--r--loader/texture.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/loader/texture.cpp b/loader/texture.cpp
index fc180bc3..ce6fe3fa 100644
--- a/loader/texture.cpp
+++ b/loader/texture.cpp
@@ -1,6 +1,7 @@
#include "impl.hpp"
#include "compat/assert.hpp"
#include "compat/defs.hpp"
+#include "compat/array-size.hpp"
#include "compat/exception.hpp"
#include "compat/strerror.hpp"
#include <cstring>
@@ -29,11 +30,11 @@ Trade::ImageData2D loader_impl::texture(StringView prefix, StringView filename_)
for (auto extension : { ".tga"_s, ".png"_s, ".webp"_s, })
{
- fm_soft_assert(len + extension.size() < std::size(buf));
+ fm_soft_assert(len + extension.size() < array_size(buf));
std::memcpy(buf + len, extension.data(), extension.size());
buf[len + extension.size()] = '\0';
auto path = StringView{buf, len + extension.size(), StringViewFlag::NullTerminated};
- fm_debug_assert(path.size() < std::size(buf));
+ fm_debug_assert(path.size() < array_size(buf));
auto& importer = extension == ".tga"_s ? tga_importer : image_importer;
if (Path::exists(path) && importer->openFile(path))
{