zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 70b183b0b9b3277db08bbe6e3093bfa06ba09264
parent 8071d2c49d86d3545db50b991c22c2a77b6dc851
Author: Johannes Lorenz <j.git@lorenz-ho.me>
Date:   Wed, 16 Dec 2020 21:42:17 +0100

Stereo: Apply Rule of zero

Implicitly-declared copy CTOR of `zyn::Stereo`is deprecated, because it
has a user-defined assignment operator. Removing the copy CTOR fixes the
warning.

Diffstat:
Msrc/Misc/Stereo.cpp | 8--------
Msrc/Misc/Stereo.h | 3---
2 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/src/Misc/Stereo.cpp b/src/Misc/Stereo.cpp @@ -23,12 +23,4 @@ Stereo<T>::Stereo(const T &val) :l(val), r(val) {} -template<class T> -Stereo<T> &Stereo<T>::operator=(const Stereo<T> &nstr) -{ - l = nstr.l; - r = nstr.r; - return *this; -} - } diff --git a/src/Misc/Stereo.h b/src/Misc/Stereo.h @@ -23,9 +23,6 @@ struct Stereo { /**Initializes Stereo with left and right set to val * @param val the value for both channels*/ Stereo(const T &val); - ~Stereo() {} - - Stereo<T> &operator=(const Stereo<T> &smp); //data T l, r;