[Scummvm-git-logs] scummvm master -> 1be536ae2ffd4a079ab2d68fe944457e8898ae1d
digitall
noreply at scummvm.org
Sun Jun 25 21:05:08 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1be536ae2f WATCHMAKER: Fix Memset of Non Trivial Structure GCC Compiler Warning
Commit: 1be536ae2ffd4a079ab2d68fe944457e8898ae1d
https://github.com/scummvm/scummvm/commit/1be536ae2ffd4a079ab2d68fe944457e8898ae1d
Author: D G Turner (digitall at scummvm.org)
Date: 2023-06-25T22:04:44+01:00
Commit Message:
WATCHMAKER: Fix Memset of Non Trivial Structure GCC Compiler Warning
Changed paths:
engines/watchmaker/ll/ll_regen.cpp
engines/watchmaker/struct.h
diff --git a/engines/watchmaker/ll/ll_regen.cpp b/engines/watchmaker/ll/ll_regen.cpp
index 72fcd30bef5..699d7e8c8c2 100644
--- a/engines/watchmaker/ll/ll_regen.cpp
+++ b/engines/watchmaker/ll/ll_regen.cpp
@@ -236,7 +236,7 @@ void Regen(WGame &game) {
* ResetScreenBuffer
* --------------------------------------------------*/
void ResetScreenBuffer() {
- memset(OldPaintRect, 0, sizeof(OldPaintRect));
+ for (uint i = 0; i < ARRAYSIZE(OldPaintRect); i++) OldPaintRect[i].reset();
if (!rClearBuffers(rCLEARSCREENBUFFER | rCLEARZBUFFER))
warning("Unable to clear screenbuffer");
diff --git a/engines/watchmaker/struct.h b/engines/watchmaker/struct.h
index a21e4cc114a..7fffaae4b3e 100644
--- a/engines/watchmaker/struct.h
+++ b/engines/watchmaker/struct.h
@@ -440,8 +440,22 @@ struct SD3DBitmap {
int32 rtype = 0;
};
struct SDDBitmap {
- int32 tnum = 0;
- int32 px = 0, py = 0, ox = 0, oy = 0, dx = 0, dy = 0;
+ int32 tnum;
+ int32 px, py, ox, oy, dx, dy;
+
+ SDDBitmap() {
+ reset();
+ }
+
+ void reset() {
+ tnum =0;
+ px = 0;
+ py = 0;
+ ox = 0;
+ oy = 0;
+ dx = 0;
+ dy = 0;
+ }
};
enum class FontKind;
More information about the Scummvm-git-logs
mailing list