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

Unified Diff: net/quic/quic_data_writer.cc

Issue 1160203003: net: Remove the remaining use of GG_(U)INTn_C macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stdint.h Created 5 years, 7 months 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_bandwidth.cc ('k') | net/quic/quic_data_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_data_writer.cc
diff --git a/net/quic/quic_data_writer.cc b/net/quic/quic_data_writer.cc
index 4ebfab07da5da9d00ee0ebf9c8123aeaaef961b5..d3a6699614437039540eb5e838eae492f4b98482 100644
--- a/net/quic/quic_data_writer.cc
+++ b/net/quic/quic_data_writer.cc
@@ -4,6 +4,7 @@
#include "net/quic/quic_data_writer.h"
+#include <stdint.h>
#include <algorithm>
#include <limits>
@@ -47,7 +48,7 @@ bool QuicDataWriter::WriteUInt64(uint64 value) {
bool QuicDataWriter::WriteUFloat16(uint64 value) {
uint16 result;
- if (value < (GG_UINT64_C(1) << kUFloat16MantissaEffectiveBits)) {
+ if (value < (UINT64_C(1) << kUFloat16MantissaEffectiveBits)) {
// Fast path: either the value is denormalized, or has exponent zero.
// Both cases are represented by the value itself.
result = static_cast<uint16>(value);
@@ -64,7 +65,7 @@ bool QuicDataWriter::WriteUFloat16(uint64 value) {
// Right-shift the value until the highest bit is in position 11.
// For offset of 16, 8, 4, 2 and 1 (binary search over 1-30),
// shift if the bit is at or above 11 + offset.
- if (value >= (GG_UINT64_C(1) << (kUFloat16MantissaBits + offset))) {
+ if (value >= (UINT64_C(1) << (kUFloat16MantissaBits + offset))) {
exponent += offset;
value >>= offset;
}
@@ -72,8 +73,8 @@ bool QuicDataWriter::WriteUFloat16(uint64 value) {
DCHECK_GE(exponent, 1);
DCHECK_LE(exponent, kUFloat16MaxExponent);
- DCHECK_GE(value, GG_UINT64_C(1) << kUFloat16MantissaBits);
- DCHECK_LT(value, GG_UINT64_C(1) << kUFloat16MantissaEffectiveBits);
+ DCHECK_GE(value, UINT64_C(1) << kUFloat16MantissaBits);
+ DCHECK_LT(value, UINT64_C(1) << kUFloat16MantissaEffectiveBits);
// Hidden bit (position 11) is set. We should remove it and increment the
// exponent. Equivalently, we just add it to the exponent.
« no previous file with comments | « net/quic/quic_bandwidth.cc ('k') | net/quic/quic_data_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698