changeset 8539728fd457 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=8539728fd457
description:
mem: Tidy up CacheSet
Minor tweaks and house keeping.
diffstat:
src/mem/cache/tags/cacheset.hh | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diffs (42 lines):
diff -r 4d8b7783a692 -r 8539728fd457 src/mem/cache/tags/cacheset.hh
--- a/src/mem/cache/tags/cacheset.hh Fri Sep 04 13:13:58 2015 -0400
+++ b/src/mem/cache/tags/cacheset.hh Fri Sep 04 13:14:01 2015 -0400
@@ -45,12 +45,11 @@
* 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.
@@ -133,10 +132,7 @@
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);
}
@@ -158,10 +154,7 @@
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);
}
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev