diff options
Diffstat (limited to '3rdParty/Breakpad/src/common/dwarf/bytereader-inl.h')
-rw-r--r-- | 3rdParty/Breakpad/src/common/dwarf/bytereader-inl.h | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/3rdParty/Breakpad/src/common/dwarf/bytereader-inl.h b/3rdParty/Breakpad/src/common/dwarf/bytereader-inl.h index 3c16708..42c92f9 100644 --- a/3rdParty/Breakpad/src/common/dwarf/bytereader-inl.h +++ b/3rdParty/Breakpad/src/common/dwarf/bytereader-inl.h @@ -34,2 +34,3 @@ #include <assert.h> +#include <stdint.h> @@ -37,3 +38,3 @@ namespace dwarf2reader { -inline uint8 ByteReader::ReadOneByte(const char* buffer) const { +inline uint8 ByteReader::ReadOneByte(const uint8_t *buffer) const { return buffer[0]; @@ -41,5 +42,3 @@ inline uint8 ByteReader::ReadOneByte(const char* buffer) const { -inline uint16 ByteReader::ReadTwoBytes(const char* signed_buffer) const { - const unsigned char *buffer - = reinterpret_cast<const unsigned char *>(signed_buffer); +inline uint16 ByteReader::ReadTwoBytes(const uint8_t *buffer) const { const uint16 buffer0 = buffer[0]; @@ -53,5 +52,3 @@ inline uint16 ByteReader::ReadTwoBytes(const char* signed_buffer) const { -inline uint64 ByteReader::ReadFourBytes(const char* signed_buffer) const { - const unsigned char *buffer - = reinterpret_cast<const unsigned char *>(signed_buffer); +inline uint64 ByteReader::ReadFourBytes(const uint8_t *buffer) const { const uint32 buffer0 = buffer[0]; @@ -67,5 +64,3 @@ inline uint64 ByteReader::ReadFourBytes(const char* signed_buffer) const { -inline uint64 ByteReader::ReadEightBytes(const char* signed_buffer) const { - const unsigned char *buffer - = reinterpret_cast<const unsigned char *>(signed_buffer); +inline uint64 ByteReader::ReadEightBytes(const uint8_t *buffer) const { const uint64 buffer0 = buffer[0]; @@ -91,3 +86,3 @@ inline uint64 ByteReader::ReadEightBytes(const char* signed_buffer) const { -inline uint64 ByteReader::ReadUnsignedLEB128(const char* buffer, +inline uint64 ByteReader::ReadUnsignedLEB128(const uint8_t *buffer, size_t* len) const { @@ -96,3 +91,3 @@ inline uint64 ByteReader::ReadUnsignedLEB128(const char* buffer, unsigned int shift = 0; - unsigned char byte; + uint8_t byte; @@ -116,3 +111,3 @@ inline uint64 ByteReader::ReadUnsignedLEB128(const char* buffer, -inline int64 ByteReader::ReadSignedLEB128(const char* buffer, +inline int64 ByteReader::ReadSignedLEB128(const uint8_t *buffer, size_t* len) const { @@ -121,3 +116,3 @@ inline int64 ByteReader::ReadSignedLEB128(const char* buffer, size_t num_read = 0; - unsigned char byte; + uint8_t byte; @@ -136,3 +131,3 @@ inline int64 ByteReader::ReadSignedLEB128(const char* buffer, -inline uint64 ByteReader::ReadOffset(const char* buffer) const { +inline uint64 ByteReader::ReadOffset(const uint8_t *buffer) const { assert(this->offset_reader_); @@ -141,3 +136,3 @@ inline uint64 ByteReader::ReadOffset(const char* buffer) const { -inline uint64 ByteReader::ReadAddress(const char* buffer) const { +inline uint64 ByteReader::ReadAddress(const uint8_t *buffer) const { assert(this->address_reader_); @@ -147,3 +142,3 @@ inline uint64 ByteReader::ReadAddress(const char* buffer) const { inline void ByteReader::SetCFIDataBase(uint64 section_base, - const char *buffer_base) { + const uint8_t *buffer_base) { section_base_ = section_base; |