From 9eafca3615353a8bed60358237a1d92de7edfa89 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Tue, 25 Feb 2014 00:27:11 +0100 Subject: [PATCH] Note, NotePlayHandle: no default arguments for setVolume() and setPanning() --- include/NotePlayHandle.h | 4 ++-- include/note.h | 4 ++-- src/core/NotePlayHandle.cpp | 4 ++-- src/core/note.cpp | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index fa13b1ea8..c209b3803 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -65,8 +65,8 @@ public: Origin origin = OriginPattern ); virtual ~NotePlayHandle(); - virtual void setVolume( const volume_t volume = DefaultVolume ); - virtual void setPanning( const panning_t panning = DefaultPanning ); + virtual void setVolume( volume_t volume ); + virtual void setPanning( panning_t panning ); int midiVelocity() const { diff --git a/include/note.h b/include/note.h index 199254f9d..74bdc512e 100644 --- a/include/note.h +++ b/include/note.h @@ -107,8 +107,8 @@ public: void setLength( const MidiTime & _length ); void setPos( const MidiTime & _pos ); void setKey( const int _key ); - virtual void setVolume( const volume_t volume = DefaultVolume ); - virtual void setPanning( const panning_t panning = DefaultPanning ); + virtual void setVolume( volume_t volume ); + virtual void setPanning( panning_t panning ); void quantizeLength( const int _q_grid ); void quantizePos( const int _q_grid ); diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index b6d17a97b..3900b68eb 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -148,7 +148,7 @@ NotePlayHandle::~NotePlayHandle() -void NotePlayHandle::setVolume( const volume_t _volume ) +void NotePlayHandle::setVolume( volume_t _volume ) { note::setVolume( _volume ); @@ -158,7 +158,7 @@ void NotePlayHandle::setVolume( const volume_t _volume ) -void NotePlayHandle::setPanning( const panning_t panning ) +void NotePlayHandle::setPanning( panning_t panning ) { note::setPanning( panning ); diff --git a/src/core/note.cpp b/src/core/note.cpp index ce86cb9c0..4ba959ff6 100644 --- a/src/core/note.cpp +++ b/src/core/note.cpp @@ -124,9 +124,9 @@ void note::setKey( const int _key ) -void note::setVolume( const volume_t _volume ) +void note::setVolume( volume_t _volume ) { - const volume_t v = tLimit( _volume, MinVolume, MaxVolume ); + const volume_t v = qBound( MinVolume, _volume, MaxVolume ); // addJournalEntry( journalEntry( ChangeVolume, (int) m_volume - v ) ); m_volume = v; } @@ -134,9 +134,9 @@ void note::setVolume( const volume_t _volume ) -void note::setPanning( const panning_t _panning ) +void note::setPanning( panning_t _panning ) { - const panning_t p = tLimit( _panning, PanningLeft, PanningRight ); + const panning_t p = qBound( PanningLeft, _panning, PanningRight ); // addJournalEntry( journalEntry( ChangePanning, (int) m_panning - p ) ); m_panning = p; }