| 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.
|
|
|