addressed a few things pointed out by static analysis

* marking move assignments noexcept
* using [[fallthrough]] consistently.
* getting rid of alloca.
This commit is contained in:
Christoph Oelckers 2024-01-07 08:46:47 +01:00
commit f13ae3b706
9 changed files with 14 additions and 18 deletions

View file

@ -1182,8 +1182,8 @@ bool MapLoader::LoadNodes (MapData * map)
auto &nodes = Level->nodes;
nodes.Alloc(numnodes);
used = (uint16_t *)alloca (sizeof(uint16_t)*numnodes);
memset (used, 0, sizeof(uint16_t)*numnodes);
TArray<uint16_t> used(numnodes, true);
memset (used.data(), 0, sizeof(uint16_t) * numnodes);
auto mnp = map->Read(ML_NODES);
mn = (nodetype*)(mnp.Data() + nodetype::NF_LUMPOFFSET);