From a941970d4afe5fec3042e24bef7070e7119a8ffd Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Tue, 9 Sep 2014 21:37:27 +0000 Subject: [PATCH] Change explicit static cast from int to uint16_t to implicit cast of 0u. BUG=3663 TESTED=local windows build with VS2013. R=harryjin@google.com, tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/28389004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7123 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_coding/main/test/RTPFile.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webrtc/modules/audio_coding/main/test/RTPFile.cc b/webrtc/modules/audio_coding/main/test/RTPFile.cc index 789dc1dbc..4cef59242 100644 --- a/webrtc/modules/audio_coding/main/test/RTPFile.cc +++ b/webrtc/modules/audio_coding/main/test/RTPFile.cc @@ -109,7 +109,7 @@ uint16_t RTPBuffer::Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData, if (packet->payloadSize > 0 && payloadSize >= packet->payloadSize) { memcpy(payloadData, packet->payloadData, packet->payloadSize); } else { - return 0; + return 0u; } *offset = (packet->timeStamp / (packet->frequency / 1000)); @@ -216,7 +216,7 @@ uint16_t RTPFile::Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData, /* Check if we have reached end of file. */ if ((read_len == 0) && feof(_rtpFile)) { _rtpEOF = true; - return 0; + return 0u; } EXPECT_EQ(1u, fread(&plen, 2, 1, _rtpFile)); EXPECT_EQ(1u, fread(offset, 4, 1, _rtpFile)); @@ -232,13 +232,13 @@ uint16_t RTPFile::Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData, EXPECT_EQ(lengthBytes, plen + 8); if (plen == 0) { - return static_cast(0); + return 0u; } if (payloadSize < (lengthBytes - 20)) { - return static_cast(0); + return 0u; } if (lengthBytes < 20) { - return static_cast(0); + return 0u; } lengthBytes -= 20; EXPECT_EQ(lengthBytes, fread(payloadData, 1, lengthBytes, _rtpFile));