From de8a840db55a6768162c59ebce680d6ef7bfa641 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 9 Mar 2024 17:01:39 +0000 Subject: [PATCH] Codefix: Fully initialise `MidiFile::DataBlock` to avoid gcc warning. (#12240) --- src/music/midifile.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/music/midifile.hpp b/src/music/midifile.hpp index c66094315e..430d95bc08 100644 --- a/src/music/midifile.hpp +++ b/src/music/midifile.hpp @@ -17,8 +17,8 @@ struct MusicSongInfo; struct MidiFile { struct DataBlock { - uint32_t ticktime; ///< tick number since start of file this block should be triggered at - uint32_t realtime; ///< real-time (microseconds) since start of file this block should be triggered at + uint32_t ticktime; ///< tick number since start of file this block should be triggered at + uint32_t realtime = 0; ///< real-time (microseconds) since start of file this block should be triggered at std::vector data; ///< raw midi data contained in block DataBlock(uint32_t _ticktime = 0) : ticktime(_ticktime) { } };