mirror of
https://github.com/bdnugget/freeminer.git
synced 2026-11-07 06:57:27 +00:00
fix
This commit is contained in:
1 parent
41dc60f964
commit
44f17e4336
1 file changed
-16
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user