[Scummvm-git-logs] scummvm master -> 1a9fa34dc18813a1048ad24466fd957050f82ec6
digitall
dgturner at iee.org
Sat Aug 24 11:28:57 CEST 2019
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:
1a9fa34dc1 AGI: Fix some GCC Compilation Warnings
Commit: 1a9fa34dc18813a1048ad24466fd957050f82ec6
https://github.com/scummvm/scummvm/commit/1a9fa34dc18813a1048ad24466fd957050f82ec6
Author: D G Turner (digitall at scummvm.org)
Date: 2019-08-24T10:25:20+01:00
Commit Message:
AGI: Fix some GCC Compilation Warnings
These were associated with memset() of Mouse structure which now has
a constructor method to do this instead.
Changed paths:
engines/agi/agi.cpp
engines/agi/agi.h
engines/agi/preagi.cpp
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index c18e9ac..93e1187 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -360,10 +360,8 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
DebugMan.addDebugChannel(kDebugLevelText, "Text", "Text output debugging");
DebugMan.addDebugChannel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");
-
memset(&_game, 0, sizeof(struct AgiGame));
memset(&_debug, 0, sizeof(struct AgiDebug));
- memset(&_mouse, 0, sizeof(struct Mouse));
_game.mouseEnabled = true;
_game.mouseHidden = false;
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 02a406e..71ba8e9 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -232,6 +232,8 @@ struct gameIdList {
struct Mouse {
int button;
Common::Point pos;
+
+ Mouse() : button(0) {}
};
// Used by AGI Mouse protocol 1.0 for v27 (i.e. button pressed -variable).
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index bde7fda..6262ee9 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -50,7 +50,6 @@ PreAgiEngine::PreAgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) :
memset(&_game, 0, sizeof(struct AgiGame));
memset(&_debug, 0, sizeof(struct AgiDebug));
- memset(&_mouse, 0, sizeof(struct Mouse));
_speakerHandle = new Audio::SoundHandle();
}
More information about the Scummvm-git-logs
mailing list