SubBlock.cc (6154:6bb54dcb940e) SubBlock.cc (6285:ce086eca1ede)
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37{
38 m_address = addr;
39 setSize(size);
40 for(int i=0; i<size; i++) {
41 setByte(i, 0);
42 }
43}
44
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37{
38 m_address = addr;
39 setSize(size);
40 for(int i=0; i<size; i++) {
41 setByte(i, 0);
42 }
43}
44
45SubBlock::SubBlock(const Address& addr, const Address& logicalAddress, int size)
46{
47 m_address = addr;
48 m_logicalAddress = logicalAddress;
49 setSize(size);
50 for(int i=0; i<size; i++) {
51 setByte(i, 0);
52 }
53}
54
55void SubBlock::internalMergeFrom(const DataBlock& data)
56{
57 int size = getSize();
58 assert(size > 0);
59 int offset = m_address.getOffset();
60 for(int i=0; i<size; i++) {
61 this->setByte(i, data.getByte(offset+i));
62 }

--- 19 unchanged lines hidden ---
45void SubBlock::internalMergeFrom(const DataBlock& data)
46{
47 int size = getSize();
48 assert(size > 0);
49 int offset = m_address.getOffset();
50 for(int i=0; i<size; i++) {
51 this->setByte(i, data.getByte(offset+i));
52 }

--- 19 unchanged lines hidden ---