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

Unified Diff: net/quic/core/quic_framer.cc

Issue 2524523002: Remove various 'using std::' statements from QUIC code and use (Closed)
Patch Set: Rebase Created 4 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/core/quic_frame_list.cc ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_framer.cc
diff --git a/net/quic/core/quic_framer.cc b/net/quic/core/quic_framer.cc
index bdc6f8ceca5f47e885c89ecf10ee68d4cec6fe2f..b7b1809e0a924f1a11cc2f79a708aa8eb18dbd93 100644
--- a/net/quic/core/quic_framer.cc
+++ b/net/quic/core/quic_framer.cc
@@ -26,8 +26,6 @@
using base::ContainsKey;
using base::StringPiece;
-using std::max;
-using std::min;
using std::string;
#define PREDICT_FALSE(x) (x)
@@ -778,7 +776,8 @@ void QuicFramer::SetLastPacketNumber(const QuicPacketHeader& header) {
last_path_id_ = header.path_id;
}
last_packet_number_ = header.packet_number;
- largest_packet_number_ = max(header.packet_number, largest_packet_number_);
+ largest_packet_number_ =
+ std::max(header.packet_number, largest_packet_number_);
}
void QuicFramer::OnPathClosed(QuicPathId path_id) {
@@ -952,7 +951,7 @@ QuicFramer::AckFrameInfo QuicFramer::GetAckFrameInfo(
(total_gap + std::numeric_limits<uint8_t>::max() - 1) /
std::numeric_limits<uint8_t>::max();
new_ack_info.max_block_length =
- max(new_ack_info.max_block_length, interval.Length());
+ std::max(new_ack_info.max_block_length, interval.Length());
}
return new_ack_info;
}
@@ -1715,7 +1714,7 @@ size_t QuicFramer::GetAckFrameSize(
ack_size += ack_block_length;
if (ack_info.num_ack_blocks != 0) {
ack_size += kNumberOfAckBlocksSize;
- ack_size += min(ack_info.num_ack_blocks, kMaxAckBlocks) *
+ ack_size += std::min(ack_info.num_ack_blocks, kMaxAckBlocks) *
(ack_block_length + PACKET_1BYTE_PACKET_NUMBER);
}
@@ -1938,7 +1937,8 @@ bool QuicFramer::AppendAckFrameAndTypeByte(const QuicAckFrame& frame,
(ack_block_length + PACKET_1BYTE_PACKET_NUMBER);
// Number of ack blocks.
- size_t num_ack_blocks = min(new_ack_info.num_ack_blocks, max_num_ack_blocks);
+ size_t num_ack_blocks =
+ std::min(new_ack_info.num_ack_blocks, max_num_ack_blocks);
if (num_ack_blocks > std::numeric_limits<uint8_t>::max()) {
num_ack_blocks = std::numeric_limits<uint8_t>::max();
}
« no previous file with comments | « net/quic/core/quic_frame_list.cc ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698