]> git.sesse.net Git - nageru/blobdiff - nageru/midi_mapper.cpp
Move another helper into midi_mapper_util.h.
[nageru] / nageru / midi_mapper.cpp
index 59637b1d24107473893f8487227c270942a19058..7457fbb53f99082a292c5c8699e6fd01e28fd103 100644 (file)
@@ -327,19 +327,6 @@ void MIDIMapper::update_highlights()
        }
 }
 
-// Find what MIDI note the given light (as given by field_number) is mapped to, and enable it.
-void activate_mapped_light(const MIDIMappingBusProto &bus_mapping, int field_number, set<unsigned> *active_lights)
-{
-       const FieldDescriptor *descriptor = bus_mapping.GetDescriptor()->FindFieldByNumber(field_number);
-       const Reflection *bus_reflection = bus_mapping.GetReflection();
-       if (!bus_reflection->HasField(bus_mapping, descriptor)) {
-               return;
-       }
-       const MIDILightProto &light_proto =
-               static_cast<const MIDILightProto &>(bus_reflection->GetMessage(bus_mapping, descriptor));
-       active_lights->insert(light_proto.note_number());
-}
-
 void MIDIMapper::update_lights_lock_held()
 {
        if (global_audio_mixer == nullptr) {