Use string concatenation and PBD::to_string in EventTypeMap::to_symbol()
Avoid using PBD::string_compose for serialization as correct behaviour depends on the setting of the global C++ locale.
This commit is contained in:
parent
1f094027c5
commit
1ef690da19
@ -268,26 +268,26 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const
|
|||||||
} else if (t == RecSafeAutomation) {
|
} else if (t == RecSafeAutomation) {
|
||||||
return "rec-safe";
|
return "rec-safe";
|
||||||
} else if (t == PluginAutomation) {
|
} else if (t == PluginAutomation) {
|
||||||
return string_compose("parameter-%1", param.id());
|
return std::string("parameter-") + PBD::to_string(param.id());
|
||||||
#ifdef LV2_SUPPORT
|
#ifdef LV2_SUPPORT
|
||||||
} else if (t == PluginPropertyAutomation) {
|
} else if (t == PluginPropertyAutomation) {
|
||||||
const char* uri = _uri_map->id_to_uri(param.id());
|
const char* uri = _uri_map->id_to_uri(param.id());
|
||||||
if (uri) {
|
if (uri) {
|
||||||
return string_compose("property-%1", uri);
|
return std::string("property-") + uri;
|
||||||
} else {
|
} else {
|
||||||
return string_compose("property-%1", param.id());
|
return std::string("property-") + PBD::to_string(param.id());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} else if (t == MidiCCAutomation) {
|
} else if (t == MidiCCAutomation) {
|
||||||
return string_compose("midicc-%1-%2", int(param.channel()), param.id());
|
return std::string("midicc-") + PBD::to_string (param.channel()) + "-" + PBD::to_string (param.id());
|
||||||
} else if (t == MidiPgmChangeAutomation) {
|
} else if (t == MidiPgmChangeAutomation) {
|
||||||
return string_compose("midi-pgm-change-%1", int(param.channel()));
|
return std::string("midi-pgm-change-") + PBD::to_string(param.channel());
|
||||||
} else if (t == MidiPitchBenderAutomation) {
|
} else if (t == MidiPitchBenderAutomation) {
|
||||||
return string_compose("midi-pitch-bender-%1", int(param.channel()));
|
return std::string("midi-pitch-bender-") + PBD::to_string(param.channel());
|
||||||
} else if (t == MidiChannelPressureAutomation) {
|
} else if (t == MidiChannelPressureAutomation) {
|
||||||
return string_compose("midi-channel-pressure-%1", int(param.channel()));
|
return std::string("midi-channel-pressure-") + PBD::to_string(param.channel());
|
||||||
} else if (t == MidiNotePressureAutomation) {
|
} else if (t == MidiNotePressureAutomation) {
|
||||||
return string_compose("midi-note-pressure-%1-%2", int(param.channel()), param.id());
|
return std::string ("midi-note-pressure-") + PBD::to_string (param.channel()) + "-" + PBD::to_string (param.id());
|
||||||
} else {
|
} else {
|
||||||
PBD::warning << "Uninitialized Parameter symbol() called." << endmsg;
|
PBD::warning << "Uninitialized Parameter symbol() called." << endmsg;
|
||||||
return "";
|
return "";
|
||||||
|
Loading…
Reference in New Issue
Block a user