Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: net/quic/quic_fec_group.cc

Issue 761863002: Clean up type usage and fix MSVC "truncated value" warnings in net/quic/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More work Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_fec_group.h" 5 #include "net/quic/quic_fec_group.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 for (size_t i = 0; i < kMaxPacketSize; ++i) { 157 for (size_t i = 0; i < kMaxPacketSize; ++i) {
158 uint8 byte = i < payload.size() ? payload[i] : 0x00; 158 uint8 byte = i < payload.size() ? payload[i] : 0x00;
159 payload_parity_[i] ^= byte; 159 payload_parity_[i] ^= byte;
160 } 160 }
161 return true; 161 return true;
162 } 162 }
163 163
164 size_t QuicFecGroup::NumMissingPackets() const { 164 size_t QuicFecGroup::NumMissingPackets() const {
165 if (min_protected_packet_ == kNoSequenceNumber) 165 if (min_protected_packet_ == kNoSequenceNumber)
166 return numeric_limits<size_t>::max(); 166 return numeric_limits<size_t>::max();
167 return (max_protected_packet_ - min_protected_packet_ + 1) - 167 return static_cast<size_t>(
168 received_packets_.size(); 168 (max_protected_packet_ - min_protected_packet_ + 1) -
169 received_packets_.size());
169 } 170 }
170 171
171 } // namespace net 172 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698