diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-16 21:57:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-16 21:57:42 +0100 |
| commit | e16c8ed02a0cb1f733a990d75a9de1bf50cf89bd (patch) | |
| tree | f6e884f103da51c8f9b76a6a76693f8389aee607 /src/lib/audio_analysis.cc | |
| parent | 1f1a9f48b39b1fc8afeb62bb6fa0cde50983b60c (diff) | |
Some missing copy constructors / operator= / noncopyable.
Diffstat (limited to 'src/lib/audio_analysis.cc')
| -rw-r--r-- | src/lib/audio_analysis.cc | 21 |
1 files changed, 21 insertions, 0 deletions
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 { |
