Mercurial > hg > svcore
changeset 1733:c3b5564cfb78 by-id
Fix some deprecation warnings
author | Chris Cannam |
---|---|
date | Mon, 24 Jun 2019 14:28:17 +0100 |
parents | 87b4c596c0ef |
children | bffccc8de3c1 d91ff235e69d |
files | base/TextMatcher.h data/midi/MIDIEvent.h data/model/RangeSummarisableTimeValueModel.h |
diffstat | 3 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/base/TextMatcher.h Fri Jun 21 14:35:38 2019 +0100 +++ b/base/TextMatcher.h Mon Jun 24 14:28:17 2019 +0100 @@ -38,8 +38,9 @@ FragmentMap fragments; Match() : score(0) { } - Match(const Match &m) : - key(m.key), score(m.score), fragments(m.fragments) { } + + Match(const Match &m) =default; + Match &operator=(const Match &m) =default; bool operator<(const Match &m) const; // sort by score first };
--- a/data/midi/MIDIEvent.h Fri Jun 21 14:35:38 2019 +0100 +++ b/data/midi/MIDIEvent.h Mon Jun 24 14:28:17 2019 +0100 @@ -162,6 +162,9 @@ m_metaMessage(sysEx) { } + MIDIEvent(const MIDIEvent &) =default; + MIDIEvent& operator=(const MIDIEvent &) =default; + ~MIDIEvent() { } void setTime(const unsigned long &time) { m_deltaTime = time; } @@ -195,8 +198,6 @@ friend bool operator<(const MIDIEvent &a, const MIDIEvent &b); private: - MIDIEvent& operator=(const MIDIEvent); - unsigned long m_deltaTime; unsigned long m_duration; MIDIByte m_eventCode;
--- a/data/model/RangeSummarisableTimeValueModel.h Fri Jun 21 14:35:38 2019 +0100 +++ b/data/model/RangeSummarisableTimeValueModel.h Mon Jun 24 14:28:17 2019 +0100 @@ -41,10 +41,11 @@ public: Range() : m_new(true), m_min(0.f), m_max(0.f), m_absmean(0.f) { } - Range(const Range &r) : - m_new(true), m_min(r.m_min), m_max(r.m_max), m_absmean(r.m_absmean) { } Range(float min, float max, float absmean) : - m_new(true), m_min(min), m_max(max), m_absmean(absmean) { } + m_new(false), m_min(min), m_max(max), m_absmean(absmean) { } + + Range(const Range &r) =default; + Range &operator=(const Range &) =default; float min() const { return m_min; } float max() const { return m_max; }