From 48977265aea8b0fb78d666ff7cd3307b9b3b75e6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Jan 2024 10:05:41 +0100 Subject: [PATCH] minor backend update from GZDoom. --- source/common/engine/renderstyle.h | 2 +- source/common/textures/bitmap.h | 4 ++-- source/common/utility/zstring.cpp | 2 +- source/common/utility/zstring.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/common/engine/renderstyle.h b/source/common/engine/renderstyle.h index 272f23ba51e..19d788e2ced 100644 --- a/source/common/engine/renderstyle.h +++ b/source/common/engine/renderstyle.h @@ -55,7 +55,7 @@ enum ETexMode }; // Legacy render styles -enum ERenderStyle +enum ERenderStyle : int { STYLE_None, // Do not draw STYLE_Normal, // Normal; just copy the image to the screen diff --git a/source/common/textures/bitmap.h b/source/common/textures/bitmap.h index de9850c27c1..2828be356ae 100644 --- a/source/common/textures/bitmap.h +++ b/source/common/textures/bitmap.h @@ -108,7 +108,7 @@ class FBitmap 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 @@ class FBitmap 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; diff --git a/source/common/utility/zstring.cpp b/source/common/utility/zstring.cpp index 160647b7bbc..ecd0dc7e63e 100644 --- a/source/common/utility/zstring.cpp +++ b/source/common/utility/zstring.cpp @@ -217,7 +217,7 @@ FString &FString::operator = (const FString &other) return *this; } -FString &FString::operator = (FString &&other) +FString &FString::operator = (FString &&other) noexcept { assert (Chars != NULL); diff --git a/source/common/utility/zstring.h b/source/common/utility/zstring.h index 5913d1e1974..93d67902152 100644 --- a/source/common/utility/zstring.h +++ b/source/common/utility/zstring.h @@ -179,7 +179,7 @@ class FString const char &operator[] (unsigned long long index) const { return Chars[index]; } FString &operator = (const FString &other); - FString &operator = (FString &&other); + FString &operator = (FString &&other) noexcept; FString &operator = (const char *copyStr); FString operator + (const FString &tail) const;