Fix -Wrange-loop-analysis.

The new xcode-clang in xcode 12 turns on -Wrange-loop-analysis by
default, this CL tries to fix problems caused by this.

Bug: webrtc:12134
Change-Id: I77fd9a28486690c11dceceafc4d72f131b081788
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191762
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32559}
This commit is contained in:
Mirko Bonadei
2020-11-05 16:08:13 +01:00
committed by Commit Bot
parent 5481784385
commit 85fae2acc5
2 changed files with 15 additions and 1 deletions

View File

@ -37,7 +37,7 @@ NSObject *ValueFromStatsMember(const RTCStatsMemberInterface *member) {
case RTCStatsMemberInterface::kSequenceBool: {
std::vector<bool> sequence = *member->cast_to<RTCStatsMember<std::vector<bool>>>();
NSMutableArray *array = [NSMutableArray arrayWithCapacity:sequence.size()];
for (const auto &item : sequence) {
for (auto item : sequence) {
[array addObject:[NSNumber numberWithBool:item]];
}
return [array copy];