From 9f2bb1b371f2bd652d6d130f789da0a263e5678a Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 17 Feb 2019 19:45:24 -1000 Subject: [PATCH] Implicit switch fallthrough refactor --- driver/amuseplay.cpp | 2 ++ lib/AudioGroupSampleDirectory.cpp | 1 + lib/DirectoryEnumerator.cpp | 1 + lib/Sequencer.cpp | 5 +++++ lib/SongConverter.cpp | 1 + 5 files changed, 10 insertions(+) diff --git a/driver/amuseplay.cpp b/driver/amuseplay.cpp index e83b197..9d85bbf 100644 --- a/driver/amuseplay.cpp +++ b/driver/amuseplay.cpp @@ -398,6 +398,7 @@ struct AppCallback : boo::IApplicationCallback { #endif } m_updateDisp = true; + break; default: break; } @@ -870,6 +871,7 @@ void EventCallback::specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, break; case boo::ESpecialKey::Esc: m_app.m_breakout = true; + break; default: break; } diff --git a/lib/AudioGroupSampleDirectory.cpp b/lib/AudioGroupSampleDirectory.cpp index 50f8ad2..16b47e1 100644 --- a/lib/AudioGroupSampleDirectory.cpp +++ b/lib/AudioGroupSampleDirectory.cpp @@ -893,6 +893,7 @@ AudioGroupSampleDirectory::toGCNData(const AudioGroupDatabase& group) const { case SampleFileState::WAVRecent: case SampleFileState::WAVNoCompressed: group.makeCompressedVersion(ent.first, ent.second.get().get()); + break; default: break; } diff --git a/lib/DirectoryEnumerator.cpp b/lib/DirectoryEnumerator.cpp index 7f27268..0448e0f 100644 --- a/lib/DirectoryEnumerator.cpp +++ b/lib/DirectoryEnumerator.cpp @@ -206,6 +206,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool if (mode == Mode::DirsSorted) break; rewinddir(dir); + [[fallthrough]]; } case Mode::FilesSorted: { if (mode == Mode::FilesSorted) diff --git a/lib/Sequencer.cpp b/lib/Sequencer.cpp index 28b3fdf..293f821 100644 --- a/lib/Sequencer.cpp +++ b/lib/Sequencer.cpp @@ -291,19 +291,24 @@ void Sequencer::ChannelState::setCtrlValue(uint8_t ctrl, int8_t val) { // RPN LSB m_rpn &= ~0x7f; m_rpn |= val; + break; case 99: // RPN MSB m_rpn &= ~0x3f80; m_rpn |= val << 7; + break; case 6: if (m_rpn == 0) m_pitchWheelRange = val; + break; case 96: if (m_rpn == 0) m_pitchWheelRange += 1; + break; case 97: if (m_rpn == 0) m_pitchWheelRange -= 1; + break; default: break; } diff --git a/lib/SongConverter.cpp b/lib/SongConverter.cpp index 94988ec..b5f5ef4 100644 --- a/lib/SongConverter.cpp +++ b/lib/SongConverter.cpp @@ -144,6 +144,7 @@ public: uint32_t tempo = 0; memcpy(&reinterpret_cast(&tempo)[1], &*it, 3); m_tempos.emplace(m_tick, 60000000 / SBig(tempo)); + [[fallthrough]]; } default: it += length;