Skip to content

Commit

Permalink
Split ternary operator into separate if statement
Browse files Browse the repository at this point in the history
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
  • Loading branch information
sakertooth committed Jul 19, 2023
1 parent e3a4d4e commit 41c9f02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tracks/MidiClip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ MidiClip * MidiClip::adjacentMidiClipByOffset(int offset) const
{
std::vector<Clip *> clips = m_instrumentTrack->getClips();
int clipNum = m_instrumentTrack->getClipNum(this);
return (clipNum < 0 || clipNum > clips.size() - 1) ? nullptr : dynamic_cast<MidiClip*>(clips[clipNum + offset]);
if (clipNum < 0 || clipNum > clips.size() - 1) { return nullptr; }
return dynamic_cast<MidiClip*>(clips[clipNum + offset]);
}


Expand Down

0 comments on commit 41c9f02

Please sign in to comment.