Fix clang style warnings in webrtc/modules/audio_coding/neteq

Mostly this consists of marking functions with override when
applicable, and moving function bodies from .h to .cc files.

BUG=163
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44109004

Cr-Commit-Position: refs/heads/master@{#8960}
This commit is contained in:
Karl Wiberg
2015-04-09 15:44:22 +02:00
parent 411777584c
commit 7f6c4d42a2
30 changed files with 209 additions and 116 deletions

View File

@ -18,6 +18,21 @@
namespace webrtc {
AudioVector::AudioVector()
: array_(new int16_t[kDefaultInitialSize]),
first_free_ix_(0),
capacity_(kDefaultInitialSize) {
}
AudioVector::AudioVector(size_t initial_size)
: array_(new int16_t[initial_size]),
first_free_ix_(initial_size),
capacity_(initial_size) {
memset(array_.get(), 0, initial_size * sizeof(int16_t));
}
AudioVector::~AudioVector() = default;
void AudioVector::Clear() {
first_free_ix_ = 0;
}
@ -145,6 +160,16 @@ void AudioVector::CrossFade(const AudioVector& append_this,
PushBack(&append_this[fade_length], samples_to_push_back);
}
// Returns the number of elements in this AudioVector.
size_t AudioVector::Size() const {
return first_free_ix_;
}
// Returns true if this AudioVector is empty.
bool AudioVector::Empty() const {
return first_free_ix_ == 0;
}
const int16_t& AudioVector::operator[](size_t index) const {
return array_[index];
}