From e16c8ed02a0cb1f733a990d75a9de1bf50cf89bd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 16 Jul 2013 21:57:42 +0100 Subject: Some missing copy constructors / operator= / noncopyable. --- src/lib/audio_analysis.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/lib/audio_analysis.cc') diff --git a/src/lib/audio_analysis.cc b/src/lib/audio_analysis.cc index e12516620..bc59bccca 100644 --- a/src/lib/audio_analysis.cc +++ b/src/lib/audio_analysis.cc @@ -48,6 +48,27 @@ AudioPoint::AudioPoint (istream& s) } } +AudioPoint::AudioPoint (AudioPoint const & other) +{ + for (int i = 0; i < COUNT; ++i) { + _data[i] = other._data[i]; + } +} + +AudioPoint & +AudioPoint::operator= (AudioPoint const & other) +{ + if (this == &other) { + return *this; + } + + for (int i = 0; i < COUNT; ++i) { + _data[i] = other._data[i]; + } + + return *this; +} + void AudioPoint::write (ostream& s) const { -- cgit v1.2.3