diff options
author | liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-12-01 04:13:50 +0000 |
---|---|---|
committer | liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-12-01 04:13:50 +0000 |
commit | 0acafda8f424bb8a5adcf77bf2d4bdb3a9661d4b (patch) | |
tree | b766caaf5d0adfb48eaef0e5afd23f5200a08402 /src | |
parent | baac9c39fea1ba6a65b6368fc422c5a5392e6fea (diff) | |
download | protobuf-0acafda8f424bb8a5adcf77bf2d4bdb3a9661d4b.tar.gz protobuf-0acafda8f424bb8a5adcf77bf2d4bdb3a9661d4b.tar.bz2 protobuf-0acafda8f424bb8a5adcf77bf2d4bdb3a9661d4b.zip |
Fix byte encoding macros.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/io/coded_stream.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h index 1842edf6..9a41a644 100644 --- a/src/google/protobuf/io/coded_stream.h +++ b/src/google/protobuf/io/coded_stream.h @@ -782,8 +782,7 @@ inline const uint8* CodedInputStream::ReadLittleEndian64FromArray( } inline bool CodedInputStream::ReadLittleEndian32(uint32* value) { -#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \ - defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN +#if defined(PROTOBUF_LITTLE_ENDIAN) if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) { memcpy(value, buffer_, sizeof(*value)); Advance(sizeof(*value)); @@ -797,8 +796,7 @@ inline bool CodedInputStream::ReadLittleEndian32(uint32* value) { } inline bool CodedInputStream::ReadLittleEndian64(uint64* value) { -#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \ - defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN +#if defined(PROTOBUF_LITTLE_ENDIAN) if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) { memcpy(value, buffer_, sizeof(*value)); Advance(sizeof(*value)); |