From 9779ba2e37a753df407b976fc4b299d936ea62b8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 2 Dec 2014 06:07:36 -0500 Subject: mem: Add const getters for write packet data This patch takes a first step in tightening up how we use the data pointer in write packets. A const getter is added for the pointer itself (getConstPtr), and a number of member functions are also made const accordingly. In a range of places throughout the memory system the new member is used. The patch also removes the unused isReadWrite function. --- src/mem/ruby/common/DataBlock.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 56320523b..ac08fac82 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -59,7 +59,7 @@ class DataBlock 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 setData(const 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; -- cgit v1.2.3