13
0

slightly improve mgmt of shared_ptr<MIDISceneChange>

This commit is contained in:
Paul Davis 2024-06-21 12:49:58 -06:00
parent 3e5dfe0466
commit 509108f23e

View File

@ -340,7 +340,7 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
bank = std::dynamic_pointer_cast<AsyncMIDIPort>(input_port)->channel (channel)->bank(); bank = std::dynamic_pointer_cast<AsyncMIDIPort>(input_port)->channel (channel)->bank();
} }
MIDISceneChange* msc =new MIDISceneChange (channel, bank, program & 0x7f); std::shared_ptr<MIDISceneChange> msc (new MIDISceneChange (channel, bank, program & 0x7f));
/* check for identical scene change so we can re-use color, if any */ /* check for identical scene change so we can re-use color, if any */