From a8fa9b75a1ee4d8ac173a8a6ad70233d3fac981e Mon Sep 17 00:00:00 2001 From: Colin Wallace Date: Sun, 6 Sep 2015 13:12:08 -0700 Subject: [PATCH] Simplify conditional by initializing vol/pan to defaults --- src/gui/editors/PianoRoll.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index caff5c801..af7e35161 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -2077,8 +2077,8 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me ) // determine what volume/panning to set note to // if middle-click, set to defaults - volume_t vol; - panning_t pan; + volume_t vol = DefaultVolume; + panning_t pan = DefaultPanning; if( me->buttons() & Qt::LeftButton ) { @@ -2093,11 +2093,6 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me ) ( (float)( PanningRight - PanningLeft ) ), PanningLeft, PanningRight); } - else - { - vol = DefaultVolume; - pan = DefaultPanning; - } if( m_noteEditMode == NoteEditVolume ) {