From e970a059508a9bb77bd799f963450bf1b0347c77 Mon Sep 17 00:00:00 2001 From: Luis Michaelis Date: Thu, 28 Dec 2023 11:55:11 +0100 Subject: [PATCH] fix(Archive): MSVC compatibility --- src/archive/ArchiveAscii.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/archive/ArchiveAscii.cc b/src/archive/ArchiveAscii.cc index 89585675..5b67c57f 100644 --- a/src/archive/ArchiveAscii.cc +++ b/src/archive/ArchiveAscii.cc @@ -351,7 +351,7 @@ namespace zenkit { std::array::digits10 + 2) * 4> buf {}; auto n = std::snprintf(buf.data(), buf.size(), "%d %d %d %d", v.r, v.g, v.b, v.a); - this->write_entry(name, "color", std::string_view {buf.begin(), static_cast(n)}); + this->write_entry(name, "color", std::string_view(buf.begin(), static_cast(n))); } void WriteArchiveAscii::write_vec3(std::string_view name, glm::vec3 const& v) { @@ -359,7 +359,7 @@ namespace zenkit { (std::numeric_limits::max_exponent10 + std::numeric_limits::max_digits10 + 3) * 3> buf {}; auto n = std::snprintf(buf.data(), buf.size(), "%f %f %f", v.x, v.y, v.z); - this->write_entry(name, "vec3", std::string_view {buf.begin(), static_cast(n)}); + this->write_entry(name, "vec3", std::string_view(buf.begin(), static_cast(n))); } void WriteArchiveAscii::write_vec2(std::string_view name, glm::vec2 v) {