Skip to content

Commit

Permalink
fix(Archive): MSVC compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Dec 28, 2023
1 parent 9af3b77 commit e970a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/archive/ArchiveAscii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,15 @@ namespace zenkit {
std::array<char, (std::numeric_limits<uint8_t>::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<size_t>(n)});
this->write_entry(name, "color", std::string_view(buf.begin(), static_cast<size_t>(n)));
}

void WriteArchiveAscii::write_vec3(std::string_view name, glm::vec3 const& v) {
std::array<char,
(std::numeric_limits<float>::max_exponent10 + std::numeric_limits<float>::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<size_t>(n)});
this->write_entry(name, "vec3", std::string_view(buf.begin(), static_cast<size_t>(n)));
}

void WriteArchiveAscii::write_vec2(std::string_view name, glm::vec2 v) {
Expand Down

0 comments on commit e970a05

Please sign in to comment.