Browse Source

juce_midi_ci: Improve MinGW compatibility

v7.0.9
reuk 2 years ago
parent
commit
6d7485fd0d
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
4 changed files with 7 additions and 6 deletions
  1. +1
    -1
      examples/Audio/CapabilityInquiryDemo.h
  2. +1
    -1
      modules/juce_midi_ci/ci/juce_CIEncodings.cpp
  3. +3
    -3
      modules/juce_midi_ci/ci/juce_CIMessages.h
  4. +2
    -1
      modules/juce_midi_ci/detail/juce_CIPropertyDataMessageChunker.cpp

+ 1
- 1
examples/Audio/CapabilityInquiryDemo.h View File

@@ -1634,7 +1634,7 @@ private:
const auto channelIndex = address.getChannel() != ci::ChannelInGroup::wholeGroup const auto channelIndex = address.getChannel() != ci::ChannelInGroup::wholeGroup
? (size_t) address.getChannel() ? (size_t) address.getChannel()
: 16; : 16;
const auto buttonIndex = address.getGroup() * numChannelColumns + channelIndex;
const auto buttonIndex = (size_t) address.getGroup() * numChannelColumns + channelIndex;
return buttons[buttonIndex]; return buttons[buttonIndex];
} }


+ 1
- 1
modules/juce_midi_ci/ci/juce_CIEncodings.cpp View File

@@ -250,7 +250,7 @@ std::vector<std::byte> Encodings::decode (Span<const std::byte> bytes, Encoding
return {}; return {};
} }
result.resize (previousSize + (size_t) read);
result.resize ((size_t) read + previousSize);
if (read == 0) if (read == 0)
return result; return result;


+ 3
- 3
modules/juce_midi_ci/ci/juce_CIMessages.h View File

@@ -316,7 +316,7 @@ namespace Message
{ {
auto tie() const auto tie() const
{ {
return std::tuple();
return std::tuple<>();
} }
bool operator== (const ProfileInquiry& x) const { return tie() == x.tie(); } bool operator== (const ProfileInquiry& x) const { return tie() == x.tie(); }
@@ -655,7 +655,7 @@ namespace Message
{ {
auto tie() const auto tie() const
{ {
return std::tuple();
return std::tuple<>();
} }
bool operator== (const ProcessInquiry& x) const { return tie() == x.tie(); } bool operator== (const ProcessInquiry& x) const { return tie() == x.tie(); }
@@ -710,7 +710,7 @@ namespace Message
{ {
auto tie() const auto tie() const
{ {
return std::tuple();
return std::tuple<>();
} }
bool operator== (const ProcessEndMidiMessageReport& x) const { return tie() == x.tie(); } bool operator== (const ProcessEndMidiMessageReport& x) const { return tie() == x.tie(); }


+ 2
- 1
modules/juce_midi_ci/detail/juce_CIPropertyDataMessageChunker.cpp View File

@@ -146,7 +146,8 @@ void PropertyDataMessageChunker::populateStorage() const
std::rotate (storage->begin(), storage->begin() + getRoomForBody(), storage->end()); std::rotate (storage->begin(), storage->begin() + getRoomForBody(), storage->end());
// ...and bring the storage buffer down to size, if we didn't manage to fill it // ...and bring the storage buffer down to size, if we didn't manage to fill it
storage->resize (storage->size() + numBytesRead - (size_t) getRoomForBody());
const auto room = (size_t) getRoomForBody();
storage->resize (storage->size() + numBytesRead - room);
} }
} // namespace juce::midi_ci::detail } // namespace juce::midi_ci::detail

Loading…
Cancel
Save