Skip to content

Commit f2f65cb

Browse files
USBMIDI::write: avoid pointless copy
1 parent 03171e2 commit f2f65cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/usb/include/usb/USBMIDI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class USBMIDI: public USBDevice {
118118
* @param m The MIDIMessage to send
119119
* @return true if the message was sent, false otherwise
120120
*/
121-
bool write(MIDIMessage m);
121+
bool write(const MIDIMessage& m);
122122

123123
/**
124124
* Check if a message can be read

drivers/usb/source/USBMIDI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void USBMIDI::wait_ready()
7878
}
7979

8080
// write plain MIDIMessage that will be converted to USBMidi event packet
81-
bool USBMIDI::write(MIDIMessage m)
81+
bool USBMIDI::write(const MIDIMessage& m)
8282
{
8383
_write_mutex.lock();
8484

0 commit comments

Comments
 (0)