compare Optional<unsigned> only to unsigned integers

more standard optional<T> inlines compares instead of converting second argument to T.
that leads to warnings about comparing unsigned to signed integers.

Bug: webrtc:9078
Change-Id: I43cc729d3b85d789b0c394064dc7e11dc27a37aa
Reviewed-on: https://webrtc-review.googlesource.com/66782
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22779}
This commit is contained in:
Danil Chapovalov
2018-04-06 18:03:46 +02:00
committed by Commit Bot
parent 96a0e60c6b
commit 4da18e89bd
4 changed files with 12 additions and 12 deletions

View File

@ -417,7 +417,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventProbeResultFailure) {
TEST_P(RtcEventLogEncoderTest, RtcEventProbeResultSuccess) {
const int id = RandomPositiveInt();
const int bitrate_bps = RandomBitrate();
const uint64_t bitrate_bps = rtc::checked_cast<uint64_t>(RandomBitrate());
auto event = rtc::MakeUnique<RtcEventProbeResultSuccess>(id, bitrate_bps);
const int64_t timestamp_us = event->timestamp_us_;
@ -433,7 +433,6 @@ TEST_P(RtcEventLogEncoderTest, RtcEventProbeResultSuccess) {
EXPECT_EQ(parsed_log_.GetTimestamp(0), timestamp_us);
EXPECT_EQ(rtc::dchecked_cast<int>(parsed_event.id), id);
ASSERT_TRUE(parsed_event.bitrate_bps);
EXPECT_EQ(parsed_event.bitrate_bps, bitrate_bps);
ASSERT_FALSE(parsed_event.failure_reason);
}