From 6a9e105c90a229dfdfad61deb8790f7fce069df9 Mon Sep 17 00:00:00 2001 From: Colin Wallace Date: Sun, 6 Sep 2015 15:04:46 -0700 Subject: [PATCH] Const-correctness fixes --- include/PianoRoll.h | 4 ++-- src/gui/editors/PianoRoll.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index eb70976fa..f874ec2f5 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -126,7 +126,7 @@ protected: int getKey( int y ) const; static inline void drawNoteRect( QPainter & p, int x, int y, - int width, Note * n, const QColor & noteCol ); + int width, const Note * n, const QColor & noteCol ); void removeSelection(); void selectAll(); void getSelectedNotes( NoteVector & selected_notes ); @@ -326,7 +326,7 @@ private: void copy_to_clipboard(const NoteVector & notes ) const; - void drawDetuningInfo( QPainter & _p, Note * _n, int _x, int _y ); + void drawDetuningInfo( QPainter & _p, const Note * _n, int _x, int _y ) const; bool mouseOverNote(); Note * noteUnderMouse(); diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 867e79c34..9816a7305 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -702,7 +702,7 @@ void PianoRoll::setBarColor( const QColor & c ) inline void PianoRoll::drawNoteRect(QPainter & p, int x, int y, - int width, Note * n, const QColor & noteCol ) + int width, const Note * n, const QColor & noteCol ) { ++x; ++y; @@ -770,8 +770,8 @@ inline void PianoRoll::drawNoteRect(QPainter & p, int x, int y, -inline void PianoRoll::drawDetuningInfo( QPainter & _p, Note * _n, int _x, - int _y ) +inline void PianoRoll::drawDetuningInfo( QPainter & _p, const Note * _n, int _x, + int _y ) const { int middle_y = _y + KEY_LINE_HEIGHT / 2; _p.setPen( noteColor() );