This commit is contained in:
proller committed 2025-11-24 05:03:33 +01:00
1 parent 41dc60f964
commit 44f17e4336
1 file changed
-16
-16
View File
@@ -432,24 +432,8 @@ void MapBlock::reallocate(u32 count, MapNode n)
data = new MapNode[count];
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#if __GNUC__ > 7
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#endif
if constexpr (!CONTENT_IGNORE) {
if (count > 1 && n.getContent() == CONTENT_IGNORE) {
memset(data, 0, count * sizeof(MapNode));
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
} else
std::fill_n(data, count, n);
}
m_is_mono_block = (count == 1);
}