summaryrefslogtreecommitdiffhomepage
path: root/serialize/magnum-vector.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-27 07:29:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-27 12:37:20 +0100
commitf60c3734e38408b97e10e29a6c1d8780770d5b79 (patch)
tree20f778f31725b8960d13a04388757b2f53fa0164 /serialize/magnum-vector.hpp
parent48b8e559cd72c95a5f72de625a608e85026e3785 (diff)
compat/prelude: add operator""_uz() for size_t
Diffstat (limited to 'serialize/magnum-vector.hpp')
-rw-r--r--serialize/magnum-vector.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/serialize/magnum-vector.hpp b/serialize/magnum-vector.hpp
index 08997b90..b8383d96 100644
--- a/serialize/magnum-vector.hpp
+++ b/serialize/magnum-vector.hpp
@@ -16,7 +16,7 @@ template <std::size_t N, typename T>
void adl_serializer<Magnum::Math::Vector<N, T>>::to_json(json& j, const vec& val)
{
std::array<T, N> array{};
- for (std::size_t i = 0; i < N; i++)
+ for (auto i = 0_uz; i < N; i++)
array[i] = val[i];
using nlohmann::to_json;
to_json(j, array);
@@ -28,7 +28,7 @@ void adl_serializer<Magnum::Math::Vector<N, T>>::from_json(const json& j, vec& v
std::array<T, N> array{};
using nlohmann::from_json;
from_json(j, array);
- for (std::size_t i = 0; i < N; i++)
+ for (auto i = 0_uz; i < N; i++)
val[i] = array[i];
}