* Declaration of an associative set
*/
-#ifndef __CACHESET_HH__
-#define __CACHESET_HH__
+#ifndef __MEM_CACHE_TAGS_CACHESET_HH__
+#define __MEM_CACHE_TAGS_CACHESET_HH__
#include <cassert>
-#include "mem/cache/blk.hh" // base class
/**
* An associative set of cache blocks.
do {
assert(i < assoc);
- // swap blks[i] and next
- Blktype *tmp = blks[i];
- blks[i] = next;
- next = tmp;
+ std::swap(blks[i], next);
++i;
} while (next != blk);
}
do {
assert(i >= 0);
- // swap blks[i] and next
- Blktype *tmp = blks[i];
- blks[i] = next;
- next = tmp;
+ std::swap(blks[i], next);
--i;
} while (next != blk);
}