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

@ -44,7 +44,7 @@ void WarpBuffer(TYPE *Pixels, const TYPE *source, int width, int height, int xmu
if (warptype == 1)
{
TYPE *buffer = (TYPE *)alloca(sizeof(TYPE) * max(width, height));
TArray<TYPE> buffer(max(width, height), true);
// [mxd] Rewrote to fix animation for NPo2 textures
unsigned timebase = unsigned(time * Speed * 32 / 28);
for (y = height - 1; y >= 0; y--)

View file

@ -373,8 +373,8 @@ namespace swrenderer
if ((abs(globalposz - dasprz) >> 10) >= abs(dazscale)) return;
x = 0; y = 0; j = max(mip->SizeX, mip->SizeY);
fixed_t *ggxinc = (fixed_t *)alloca((j + 1) * sizeof(fixed_t) * 2);
fixed_t *ggyinc = ggxinc + (j + 1);
TArray<fixed_t> ggxinc((j + 1) * 2);
fixed_t *ggyinc = ggxinc.data() + (j + 1);
for (i = 0; i <= j; i++)
{
ggxinc[i] = x; x += gxinc;