[Scummvm-git-logs] scummvm master -> bf83b0a4ab61a39f606d6a92778bace65c42b5cb

bluegr noreply at scummvm.org
Tue Apr 14 20:01:02 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
bf83b0a4ab AUDIO: do not use memset in constructor, disable copy and move


Commit: bf83b0a4ab61a39f606d6a92778bace65c42b5cb
    https://github.com/scummvm/scummvm/commit/bf83b0a4ab61a39f606d6a92778bace65c42b5cb
Author: Michael Kuerbis (michael_kuerbis at web.de)
Date: 2026-04-14T23:00:56+03:00

Commit Message:
AUDIO: do not use memset in constructor, disable copy and move

Changed paths:
    audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
    audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h


diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
index 14f7287ddc6..676f141309e 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
@@ -1827,10 +1827,6 @@ const uint8 TownsPC98_FmSynth::_percussionData[] = {
 };
 #endif // DISABLE_PC98_RHYTHM_CHANNEL
 
-TownsPC98_FmSynth::ChanInternal::ChanInternal() {
-	memset(this, 0, sizeof(ChanInternal));
-}
-
 TownsPC98_FmSynth::ChanInternal::~ChanInternal() {
 	for (uint i = 0; i < ARRAYSIZE(opr); ++i)
 		delete opr[i];
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
index 5052484ed04..dd79c99779c 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
@@ -125,7 +125,11 @@ private:
 #endif
 
 	struct ChanInternal {
-		ChanInternal();
+		ChanInternal() = default;
+		ChanInternal(const ChanInternal &) = delete;
+		ChanInternal(ChanInternal &&) = delete;
+		ChanInternal &operator=(const ChanInternal &) = delete;
+		ChanInternal &operator=(ChanInternal &&) = delete;
 		~ChanInternal();
 
 		void ampModSensitivity(uint32 value) {
@@ -138,16 +142,16 @@ private:
 			feedbuf[0] = feedbuf[1] = feedbuf[2] = 0;
 		}
 
-		bool enableLeft;
-		bool enableRight;
-		bool updateEnvelopeParameters;
-		int32 feedbuf[3];
-		uint8 algorithm;
+		bool enableLeft = false;
+		bool enableRight = false;
+		bool updateEnvelopeParameters = false;
+		int32 feedbuf[3] = {};
+		uint8 algorithm = 0u;
 
-		uint32 ampModSvty;
-		uint32 frqModSvty;
+		uint32 ampModSvty = 0u;
+		uint32 frqModSvty = 0u;
 
-		TownsPC98_FmSynthOperator *opr[4];
+		TownsPC98_FmSynthOperator *opr[4] = {};
 	};
 
 	TownsPC98_FmSynthSquareWaveSource *_ssg;




More information about the Scummvm-git-logs mailing list