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

Unified Diff: net/quic/quic_data_reader.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_data_reader.h ('k') | net/quic/quic_data_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_data_reader.cc
diff --git a/net/quic/quic_data_reader.cc b/net/quic/quic_data_reader.cc
index 5433283911aa735983bd936929b96d20b7f81d23..191263b1b2694e53e2714f05c5c3e01d90919180 100644
--- a/net/quic/quic_data_reader.cc
+++ b/net/quic/quic_data_reader.cc
@@ -14,20 +14,20 @@ namespace net {
QuicDataReader::QuicDataReader(const char* data, const size_t len)
: data_(data), len_(len), pos_(0) {}
-bool QuicDataReader::ReadUInt16(uint16* result) {
+bool QuicDataReader::ReadUInt16(uint16_t* result) {
return ReadBytes(result, sizeof(*result));
}
-bool QuicDataReader::ReadUInt32(uint32* result) {
+bool QuicDataReader::ReadUInt32(uint32_t* result) {
return ReadBytes(result, sizeof(*result));
}
-bool QuicDataReader::ReadUInt64(uint64* result) {
+bool QuicDataReader::ReadUInt64(uint64_t* result) {
return ReadBytes(result, sizeof(*result));
}
-bool QuicDataReader::ReadUFloat16(uint64* result) {
- uint16 value;
+bool QuicDataReader::ReadUFloat16(uint64_t* result) {
+ uint16_t value;
if (!ReadUInt16(&value)) {
return false;
}
@@ -41,7 +41,8 @@ bool QuicDataReader::ReadUFloat16(uint64* result) {
return true;
}
- uint16 exponent = value >> kUFloat16MantissaBits; // No sign extend on uint!
+ uint16_t exponent =
+ value >> kUFloat16MantissaBits; // No sign extend on uint!
// After the fast pass, the exponent is at least one (offset by one).
// Un-offset the exponent.
--exponent;
@@ -59,7 +60,7 @@ bool QuicDataReader::ReadUFloat16(uint64* result) {
bool QuicDataReader::ReadStringPiece16(StringPiece* result) {
// Read resultant length.
- uint16 result_len;
+ uint16_t result_len;
if (!ReadUInt16(&result_len)) {
// OnFailure() already called.
return false;
« no previous file with comments | « net/quic/quic_data_reader.h ('k') | net/quic/quic_data_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698