From 4c36d3b4247ee50ea8f25e82950e1d8243e277a3 Mon Sep 17 00:00:00 2001 From: "henrik.lundin@webrtc.org" Date: Mon, 19 Sep 2011 08:16:20 +0000 Subject: [PATCH] Fixing windows warnings in rtp_utility Adding explicit casting to bool to avoid warnings when compiling in windows. Review URL: http://webrtc-codereview.appspot.com/140002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@619 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/rtp_rtcp/source/rtp_utility.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/rtp_rtcp/source/rtp_utility.cc b/src/modules/rtp_rtcp/source/rtp_utility.cc index 957607f049..f89f9c64a4 100644 --- a/src/modules/rtp_rtcp/source/rtp_utility.cc +++ b/src/modules/rtp_rtcp/source/rtp_utility.cc @@ -835,9 +835,9 @@ ModuleRTPUtility::RTPPayloadParser::ParseVP8(RTPPayload& parsedPacket) const int dataLength = _dataLength; // Parse mandatory first byte of payload descriptor - bool extension = (*dataPtr & 0x80); // X bit - vp8->nonReferenceFrame = (*dataPtr & 0x20); // N bit - vp8->beginningOfPartition = (*dataPtr & 0x10); // S bit + bool extension = (*dataPtr & 0x80) ? true : false; // X bit + vp8->nonReferenceFrame = (*dataPtr & 0x20) ? true : false; // N bit + vp8->beginningOfPartition = (*dataPtr & 0x10) ? true : false; // S bit vp8->partitionID = (*dataPtr & 0x0F); // PartID field // Advance dataPtr and decrease remaining payload size @@ -884,9 +884,9 @@ ModuleRTPUtility::RTPPayloadParser::ParseVP8Extension( int parsedBytes = 0; if (dataLength <= 0) return -1; // Optional X field is present - vp8->hasPictureID = (*dataPtr & 0x80); // I bit - vp8->hasTl0PicIdx = (*dataPtr & 0x40); // L bit - vp8->hasTID = (*dataPtr & 0x20); // T bit + vp8->hasPictureID = (*dataPtr & 0x80) ? true : false; // I bit + vp8->hasTl0PicIdx = (*dataPtr & 0x40) ? true : false; // L bit + vp8->hasTID = (*dataPtr & 0x20) ? true : false; // T bit // Advance dataPtr and decrease remaining payload size dataPtr++;