Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t. BUG=webrtc:5024 R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org Review URL: https://codereview.webrtc.org/1362503003 . Cr-Commit-Position: refs/heads/master@{#10196}
This commit is contained in:
@ -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), \
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user