From f00347a20fca8bbb0a955723bf068e23fe66f170 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 11 Sep 2012 09:23:56 -0500 Subject: Ruby: Use uint8_t instead of uint8 everywhere --- src/mem/ruby/common/DataBlock.hh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/mem/ruby/common/DataBlock.hh') diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index 0ab4cfc01..56320523b 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -29,12 +29,12 @@ #ifndef __MEM_RUBY_COMMON_DATABLOCK_HH__ #define __MEM_RUBY_COMMON_DATABLOCK_HH__ +#include + #include #include #include -#include "mem/ruby/common/TypeDefines.hh" - class DataBlock { public: @@ -53,25 +53,25 @@ class DataBlock DataBlock& operator=(const DataBlock& obj); - void assign(uint8* data); + void assign(uint8_t *data); void clear(); - uint8 getByte(int whichByte) const; - const uint8* getData(int offset, int len) const; - void setByte(int whichByte, uint8 data); - void setData(uint8* data, int offset, int len); + uint8_t getByte(int whichByte) const; + const uint8_t *getData(int offset, int len) const; + void setByte(int whichByte, uint8_t data); + void setData(uint8_t *data, int offset, int len); void copyPartial(const DataBlock & dblk, int offset, int len); bool equal(const DataBlock& obj) const; void print(std::ostream& out) const; private: void alloc(); - uint8* m_data; + uint8_t *m_data; bool m_alloc; }; inline void -DataBlock::assign(uint8* data) +DataBlock::assign(uint8_t *data) { assert(data != NULL); if (m_alloc) { @@ -81,14 +81,14 @@ DataBlock::assign(uint8* data) m_alloc = false; } -inline uint8 +inline uint8_t DataBlock::getByte(int whichByte) const { return m_data[whichByte]; } inline void -DataBlock::setByte(int whichByte, uint8 data) +DataBlock::setByte(int whichByte, uint8_t data) { m_data[whichByte] = data; } -- cgit v1.2.3