Skip to content

Commit

Permalink
Merge pull request #338 from cmajor-lang/master
Browse files Browse the repository at this point in the history
Tidy some compiler warnings
  • Loading branch information
garyscavone committed Aug 21, 2024
2 parents c2d71c8 + 6afbf81 commit 24b3a3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ void MidiInCore :: openPort( unsigned int portNumber, const std::string &portNam
}

CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
unsigned int nSrc = MIDIGetNumberOfSources();
auto nSrc = MIDIGetNumberOfSources();
if ( nSrc < 1 ) {
errorString_ = "MidiInCore::openPort: no MIDI input sources found!";
error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
Expand Down Expand Up @@ -1309,7 +1309,7 @@ void MidiInCore :: setPortName ( const std::string& )
unsigned int MidiInCore :: getPortCount()
{
CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
return MIDIGetNumberOfSources();
return static_cast<unsigned int> (MIDIGetNumberOfSources());
}

// This function was submitted by Douglas Casey Tucker and apparently
Expand Down Expand Up @@ -1397,7 +1397,7 @@ static CFStringRef CreateConnectedEndpointName( MIDIEndpointRef endpoint )

// Does the endpoint have connections?
CFDataRef connections = NULL;
int nConnected = 0;
size_t nConnected = 0;
bool anyStrings = false;
err = MIDIObjectGetDataProperty( endpoint, kMIDIPropertyConnectionUniqueID, &connections );
if ( connections != NULL ) {
Expand Down Expand Up @@ -1528,7 +1528,7 @@ void MidiOutCore :: initialize( const std::string& clientName )
unsigned int MidiOutCore :: getPortCount()
{
CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
return MIDIGetNumberOfDestinations();
return static_cast<unsigned int> (MIDIGetNumberOfDestinations());
}

std::string MidiOutCore :: getPortName( unsigned int portNumber )
Expand Down Expand Up @@ -1564,7 +1564,7 @@ void MidiOutCore :: openPort( unsigned int portNumber, const std::string &portNa
}

CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
unsigned int nDest = MIDIGetNumberOfDestinations();
auto nDest = MIDIGetNumberOfDestinations();
if (nDest < 1) {
errorString_ = "MidiOutCore::openPort: no MIDI output destinations found!";
error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
Expand Down Expand Up @@ -5070,7 +5070,7 @@ unsigned int MidiInAndroid :: getPortCount() {
return androidMidiDevices.size();
}

std::string MidiInAndroid :: getPortName(unsigned int portNumber) {
std::string MidiInAndroid :: getPortName(unsigned int portNumber) {
auto env = androidGetThreadEnv();
return androidPortName(env, portNumber);
}
Expand Down

0 comments on commit 24b3a3b

Please sign in to comment.