[Scummvm-git-logs] scummvm master -> c60d53a34ed11a048873f5852b8cb34cfa2aa8f5
digitall
noreply at scummvm.org
Tue Oct 17 12:00:41 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:
c60d53a34e SWORD1: Fix Memset On Non-Trivial Structure GCC Compiler Warning
Commit: c60d53a34ed11a048873f5852b8cb34cfa2aa8f5
https://github.com/scummvm/scummvm/commit/c60d53a34ed11a048873f5852b8cb34cfa2aa8f5
Author: D G Turner (digitall at scummvm.org)
Date: 2023-10-17T13:00:25+01:00
Commit Message:
SWORD1: Fix Memset On Non-Trivial Structure GCC Compiler Warning
Changed paths:
engines/sword1/sound.cpp
engines/sword1/sound.h
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index fefe630fead..4c3f9a1c8a6 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -58,7 +58,7 @@ Sound::Sound(Audio::Mixer *mixer, SwordEngine *vm, ResMan *pResMan)
_musicOutputStream[1] = Audio::makeQueuingAudioStream(DEFAULT_SAMPLE_RATE, false);
getVolumes();
- memset(_fxQueue, 0, sizeof(_fxQueue));
+ for (uint i = 0; i < ARRAYSIZE(_fxQueue); i++) _fxQueue[i].reset();
}
Sound::~Sound() {
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index 4d1f4b27f78..4b471337547 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -51,6 +51,11 @@ namespace Sword1 {
struct QueueElement {
uint32 id, delay;
Audio::SoundHandle handle;
+
+ void reset() {
+ id = 0, delay = 0;
+ handle = Audio::SoundHandle();
+ }
};
struct RoomVol {
More information about the Scummvm-git-logs
mailing list