Index: webrtc/base/testutils.h |
diff --git a/webrtc/base/testutils.h b/webrtc/base/testutils.h |
index 4c978e7955d76faab0776c40b08884a6958531c9..cd9cdf90e54302033be1be370bedc417ec0efab3 100644 |
--- a/webrtc/base/testutils.h |
+++ b/webrtc/base/testutils.h |
@@ -542,29 +542,33 @@ inline AssertionResult CmpHelperFileEq(const char* expected_expression, |
// order |
/////////////////////////////////////////////////////////////////////////////// |
-#define BYTE_CAST(x) static_cast<uint8>((x) & 0xFF) |
+#define BYTE_CAST(x) static_cast<uint8_t>((x)&0xFF) |
// Declare a N-bit integer as a little-endian sequence of bytes |
-#define LE16(x) BYTE_CAST(((uint16)x) >> 0), BYTE_CAST(((uint16)x) >> 8) |
+#define LE16(x) BYTE_CAST(((uint16_t)x) >> 0), BYTE_CAST(((uint16_t)x) >> 8) |
-#define LE32(x) BYTE_CAST(((uint32)x) >> 0), BYTE_CAST(((uint32)x) >> 8), \ |
- BYTE_CAST(((uint32)x) >> 16), BYTE_CAST(((uint32)x) >> 24) |
+#define LE32(x) \ |
+ BYTE_CAST(((uint32_t)x) >> 0), BYTE_CAST(((uint32_t)x) >> 8), \ |
Henrik Grunell WebRTC
2015/10/05 12:00:19
Nit: Fix indentation here and below. (2 chars)
pbos-webrtc
2015/10/05 12:23:23
Formatted with clang-format, prefer not touching i
Henrik Grunell WebRTC
2015/10/05 14:10:42
Acknowledged.
|
+ BYTE_CAST(((uint32_t)x) >> 16), BYTE_CAST(((uint32_t)x) >> 24) |
-#define LE64(x) BYTE_CAST(((uint64)x) >> 0), BYTE_CAST(((uint64)x) >> 8), \ |
- BYTE_CAST(((uint64)x) >> 16), BYTE_CAST(((uint64)x) >> 24), \ |
- BYTE_CAST(((uint64)x) >> 32), BYTE_CAST(((uint64)x) >> 40), \ |
- BYTE_CAST(((uint64)x) >> 48), BYTE_CAST(((uint64)x) >> 56) |
+#define LE64(x) \ |
+ BYTE_CAST(((uint64_t)x) >> 0), BYTE_CAST(((uint64_t)x) >> 8), \ |
+ BYTE_CAST(((uint64_t)x) >> 16), BYTE_CAST(((uint64_t)x) >> 24), \ |
+ BYTE_CAST(((uint64_t)x) >> 32), BYTE_CAST(((uint64_t)x) >> 40), \ |
+ BYTE_CAST(((uint64_t)x) >> 48), BYTE_CAST(((uint64_t)x) >> 56) |
// Declare a N-bit integer as a big-endian (Internet) sequence of bytes |
-#define BE16(x) BYTE_CAST(((uint16)x) >> 8), BYTE_CAST(((uint16)x) >> 0) |
+#define BE16(x) BYTE_CAST(((uint16_t)x) >> 8), BYTE_CAST(((uint16_t)x) >> 0) |
-#define BE32(x) BYTE_CAST(((uint32)x) >> 24), BYTE_CAST(((uint32)x) >> 16), \ |
- BYTE_CAST(((uint32)x) >> 8), BYTE_CAST(((uint32)x) >> 0) |
+#define BE32(x) \ |
+ BYTE_CAST(((uint32_t)x) >> 24), BYTE_CAST(((uint32_t)x) >> 16), \ |
+ BYTE_CAST(((uint32_t)x) >> 8), BYTE_CAST(((uint32_t)x) >> 0) |
-#define BE64(x) BYTE_CAST(((uint64)x) >> 56), BYTE_CAST(((uint64)x) >> 48), \ |
- BYTE_CAST(((uint64)x) >> 40), BYTE_CAST(((uint64)x) >> 32), \ |
- BYTE_CAST(((uint64)x) >> 24), BYTE_CAST(((uint64)x) >> 16), \ |
- BYTE_CAST(((uint64)x) >> 8), BYTE_CAST(((uint64)x) >> 0) |
+#define BE64(x) \ |
+ BYTE_CAST(((uint64_t)x) >> 56), BYTE_CAST(((uint64_t)x) >> 48), \ |
+ BYTE_CAST(((uint64_t)x) >> 40), BYTE_CAST(((uint64_t)x) >> 32), \ |
+ BYTE_CAST(((uint64_t)x) >> 24), BYTE_CAST(((uint64_t)x) >> 16), \ |
+ BYTE_CAST(((uint64_t)x) >> 8), BYTE_CAST(((uint64_t)x) >> 0) |
// Declare a N-bit integer as a this-endian (local machine) sequence of bytes |
#ifndef BIG_ENDIAN |