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.
This commit is contained in:
@@ -469,7 +469,7 @@ AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size,
|
||||
|
||||
if (req->isSwap()) {
|
||||
assert(res);
|
||||
memcpy(res, pkt.getPtr<uint8_t>(), fullSize);
|
||||
memcpy(res, pkt.getConstPtr<uint8_t>(), fullSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user