diff options
author | Colin Snover | 2017-12-04 20:16:14 -0600 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-18 16:30:05 +0200 |
commit | a726b3bc896001041e2c73e7090900908349a207 (patch) | |
tree | 31704253c4ffd2e3d2ea02a2dc6f81af4b0be777 /audio | |
parent | b9a649c3e167bc8176d796db77a6b8449a731250 (diff) | |
download | scummvm-rg350-a726b3bc896001041e2c73e7090900908349a207.tar.gz scummvm-rg350-a726b3bc896001041e2c73e7090900908349a207.tar.bz2 scummvm-rg350-a726b3bc896001041e2c73e7090900908349a207.zip |
AUDIO: Remove unnecessary string duplications in FluidSynth driver
Diffstat (limited to 'audio')
-rw-r--r-- | audio/softsynth/fluidsynth.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp index 860bf5b5cb..1e78a7b5e3 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -88,26 +88,15 @@ MidiDriver_FluidSynth::MidiDriver_FluidSynth(Audio::Mixer *mixer) } void MidiDriver_FluidSynth::setInt(const char *name, int val) { - char *name2 = strdup(name); - - fluid_settings_setint(_settings, name2, val); - free(name2); + fluid_settings_setint(_settings, name, val); } void MidiDriver_FluidSynth::setNum(const char *name, double val) { - char *name2 = strdup(name); - - fluid_settings_setnum(_settings, name2, val); - free(name2); + fluid_settings_setnum(_settings, name, val); } void MidiDriver_FluidSynth::setStr(const char *name, const char *val) { - char *name2 = strdup(name); - char *val2 = strdup(val); - - fluid_settings_setstr(_settings, name2, val2); - free(name2); - free(val2); + fluid_settings_setstr(_settings, name, val); } int MidiDriver_FluidSynth::open() { |