Convert channel counts to size_t.
IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan. BUG=chromium:81439 TEST=none R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org Review URL: https://codereview.webrtc.org/1316523002 . Cr-Commit-Position: refs/heads/master@{#11229}
This commit is contained in:
@ -55,12 +55,12 @@ bool ProcessingComponent::is_component_enabled() const {
|
||||
return enabled_;
|
||||
}
|
||||
|
||||
void* ProcessingComponent::handle(int index) const {
|
||||
void* ProcessingComponent::handle(size_t index) const {
|
||||
assert(index < num_handles_);
|
||||
return handles_[index];
|
||||
}
|
||||
|
||||
int ProcessingComponent::num_handles() const {
|
||||
size_t ProcessingComponent::num_handles() const {
|
||||
return num_handles_;
|
||||
}
|
||||
|
||||
@ -70,12 +70,12 @@ int ProcessingComponent::Initialize() {
|
||||
}
|
||||
|
||||
num_handles_ = num_handles_required();
|
||||
if (num_handles_ > static_cast<int>(handles_.size())) {
|
||||
if (num_handles_ > handles_.size()) {
|
||||
handles_.resize(num_handles_, NULL);
|
||||
}
|
||||
|
||||
assert(static_cast<int>(handles_.size()) >= num_handles_);
|
||||
for (int i = 0; i < num_handles_; i++) {
|
||||
assert(handles_.size() >= num_handles_);
|
||||
for (size_t i = 0; i < num_handles_; i++) {
|
||||
if (handles_[i] == NULL) {
|
||||
handles_[i] = CreateHandle();
|
||||
if (handles_[i] == NULL) {
|
||||
@ -98,8 +98,8 @@ int ProcessingComponent::Configure() {
|
||||
return AudioProcessing::kNoError;
|
||||
}
|
||||
|
||||
assert(static_cast<int>(handles_.size()) >= num_handles_);
|
||||
for (int i = 0; i < num_handles_; i++) {
|
||||
assert(handles_.size() >= num_handles_);
|
||||
for (size_t i = 0; i < num_handles_; i++) {
|
||||
int err = ConfigureHandle(handles_[i]);
|
||||
if (err != AudioProcessing::kNoError) {
|
||||
return GetHandleError(handles_[i]);
|
||||
|
||||
Reference in New Issue
Block a user