From 638076ffb22bc630866e88fff1160a6c450882c5 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 24 Nov 2024 21:15:32 -0700 Subject: [PATCH] bspinfo: fix not clearing between styles from @Paril --- common/bspinfo.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/bspinfo.cc b/common/bspinfo.cc index 8f0d675f..30c5461b 100644 --- a/common/bspinfo.cc +++ b/common/bspinfo.cc @@ -474,11 +474,9 @@ full_atlas_t build_lightmap_atlas(const mbsp_t &bsp, const bspxentries_t &bspx, // copy out the atlas texture result.style_to_lightmap_atlas[i] = full_atlas; - if (!full_atlas.rgba8_samples.empty()) - memset(full_atlas.rgba8_samples.data(), 0, full_atlas.rgba8_samples.size()); + std::fill(full_atlas.rgba8_samples.begin(), full_atlas.rgba8_samples.end(), qvec4b{}); - if (!full_atlas.e5brg9_samples.empty()) - memset(full_atlas.e5brg9_samples.data(), 0, full_atlas.e5brg9_samples.size() * 4); + std::fill(full_atlas.e5brg9_samples.begin(), full_atlas.e5brg9_samples.end(), uint32_t{}); } auto ExportLightmapUVs = [&full_atlas, &result](const mbsp_t *bsp, const face_rect &face) {