[Scummvm-git-logs] scummvm master -> 7027be781ba39dbe4aa28eec632670dcfb82eb5c
criezy
criezy at scummvm.org
Sat Dec 5 00:07:57 UTC 2020
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:
7027be781b AUDIO: Add missing definition for static members
Commit: 7027be781ba39dbe4aa28eec632670dcfb82eb5c
https://github.com/scummvm/scummvm/commit/7027be781ba39dbe4aa28eec632670dcfb82eb5c
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-12-05T00:06:18Z
Commit Message:
AUDIO: Add missing definition for static members
This will hopefully fix undefined symbol errors for some of those.
Those const static integral members are initialized in the class
definition, which is allowed (even before c++11). But they still
need a definition if they are odr-used, and that was missing. I
suspect this is why some compiler were giving errors.
Changed paths:
audio/mt32gm.cpp
diff --git a/audio/mt32gm.cpp b/audio/mt32gm.cpp
index 3528a06f35..1567206cc5 100644
--- a/audio/mt32gm.cpp
+++ b/audio/mt32gm.cpp
@@ -28,6 +28,16 @@
#include "common/config-manager.h"
#include "common/debug.h"
+// The initialization of the static const integral data members is done in the class definition,
+// but we still need to provide a definition if they are odr-used.
+const uint8 MidiDriver_MT32GM::MAXIMUM_SOURCES;
+const uint16 MidiDriver_MT32GM::DEFAULT_SOURCE_NEUTRAL_VOLUME;
+const uint8 MidiDriver_MT32GM::MT32_DEFAULT_CHANNEL_VOLUME;
+const uint8 MidiDriver_MT32GM::GM_DEFAULT_CHANNEL_VOLUME;
+const uint8 MidiDriver_MT32GM::MAXIMUM_MT32_ACTIVE_NOTES;
+const uint8 MidiDriver_MT32GM::MAXIMUM_GM_ACTIVE_NOTES;
+const uint16 MidiDriver_MT32GM::FADING_DELAY;
+
// These are the power-on default instruments of the Roland MT-32 family.
const byte MidiDriver_MT32GM::MT32_DEFAULT_INSTRUMENTS[8] = {
0x44, 0x30, 0x5F, 0x4E, 0x29, 0x03, 0x6E, 0x7A
More information about the Scummvm-git-logs
mailing list