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

@ -108,7 +108,7 @@ public:
FBitmap(const FBitmap &other) = delete; // disallow because in nearly all cases this creates an unwanted copy.
FBitmap(FBitmap &&other)
FBitmap(FBitmap &&other) noexcept
{
data = other.data;
Pitch = other.Pitch;
@ -122,7 +122,7 @@ public:
FBitmap &operator=(const FBitmap &other) = delete; // disallow because in nearly all cases this creates an unwanted copy. Use Copy instead.
FBitmap &operator=(FBitmap &&other)
FBitmap &operator=(FBitmap &&other) noexcept
{
if (data != nullptr && FreeBuffer) delete[] data;
data = other.data;