Remove explicit =nullptr in ADL function pointers

Global data will default to nullptr, so the initialization is
unnecessary.  Some compilers may store the pointer in `.data` when it is
initialized to any value.
This commit is contained in:
Kp 2018-10-15 00:51:53 +00:00
parent 915bf4e0ba
commit d9034ea609

View file

@ -87,12 +87,12 @@ static ADL_MIDIPlayer *adl_init_first_call(long sample_rate)
}
ADL_MIDIPlayer *(*adl_init)(long sample_rate) = &adl_init_first_call;
void (*adl_close)(ADL_MIDIPlayer *device) = nullptr;
int (*adl_switchEmulator)(ADL_MIDIPlayer *device, int emulator) = nullptr;
int (*adl_setNumChips)(ADL_MIDIPlayer *device, int numChips) = nullptr;
int (*adl_setBank)(ADL_MIDIPlayer *device, int bank) = nullptr;
void (*adl_setSoftPanEnabled)(ADL_MIDIPlayer *device, int softPanEn) = nullptr;
void (*adl_setLoopEnabled)(ADL_MIDIPlayer *device, int loopEn) = nullptr;
int (*adl_openData)(ADL_MIDIPlayer *device, const void *mem, unsigned long size) = nullptr;
int (*adl_openFile)(ADL_MIDIPlayer *device, const char *filePath) = nullptr;
int (*adl_playFormat)(ADL_MIDIPlayer *device, int sampleCount, uint8_t *left, uint8_t *right, const ADLMIDI_AudioFormat *format) = nullptr;
void (*adl_close)(ADL_MIDIPlayer *device);
int (*adl_switchEmulator)(ADL_MIDIPlayer *device, int emulator);
int (*adl_setNumChips)(ADL_MIDIPlayer *device, int numChips);
int (*adl_setBank)(ADL_MIDIPlayer *device, int bank);
void (*adl_setSoftPanEnabled)(ADL_MIDIPlayer *device, int softPanEn);
void (*adl_setLoopEnabled)(ADL_MIDIPlayer *device, int loopEn);
int (*adl_openData)(ADL_MIDIPlayer *device, const void *mem, unsigned long size);
int (*adl_openFile)(ADL_MIDIPlayer *device, const char *filePath);
int (*adl_playFormat)(ADL_MIDIPlayer *device, int sampleCount, uint8_t *left, uint8_t *right, const ADLMIDI_AudioFormat *format);