[Scummvm-git-logs] scummvm master -> 61b31bbcc6fd8a74a7dbabeea25b04f48c52bdaf
digitall
547637+digitall at users.noreply.github.com
Mon Mar 22 01:43:59 UTC 2021
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:
61b31bbcc6 TOUCHE: Fix Memset on Non-Trivial Structure GCC Compiler Warnings
Commit: 61b31bbcc6fd8a74a7dbabeea25b04f48c52bdaf
https://github.com/scummvm/scummvm/commit/61b31bbcc6fd8a74a7dbabeea25b04f48c52bdaf
Author: D G Turner (digitall at scummvm.org)
Date: 2021-03-22T01:43:15Z
Commit Message:
TOUCHE: Fix Memset on Non-Trivial Structure GCC Compiler Warnings
Changed paths:
engines/touche/touche.cpp
engines/touche/touche.h
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index b8b4bfbc2c..39fbed10d3 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -3320,7 +3320,9 @@ void ToucheEngine::processAnimationTable() {
}
void ToucheEngine::clearAnimationTable() {
- memset(_animationTable, 0, sizeof(_animationTable));
+ for (uint i = 0; i < ARRAYSIZE(_animationTable); i++) {
+ _animationTable[i].clear();
+ }
}
void ToucheEngine::addToDirtyRect(const Common::Rect &r) {
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index 9a7bb1ac63..a0f25b3ebe 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -192,6 +192,20 @@ struct AnimationEntry {
int16 delayCounter;
int16 displayCounter;
Common::Rect displayRect;
+
+ void clear() {
+ num = 0;
+ x = 0;
+ y = 0;
+ dx = 0;
+ dy = 0;
+ posNum = 0;
+ delayCounter = 0;
+ displayRect.top = 0;
+ displayRect.left = 0;
+ displayRect.bottom = 0;
+ displayRect.right = 0;
+ }
};
struct SequenceEntry {
More information about the Scummvm-git-logs
mailing list