From 6ccf28c896f358d18cd942ab0f8d24fde96e153e Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 9 Oct 2008 09:25:41 -0700 Subject: style: conform to M5 style. --- src/base/range_map.hh | 63 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/src/base/range_map.hh b/src/base/range_map.hh index 6d3450739..1c121925d 100644 --- a/src/base/range_map.hh +++ b/src/base/range_map.hh @@ -46,7 +46,8 @@ class range_map typedef typename RangeMap::iterator iterator; template - const iterator find(const Range &r) + const iterator + find(const Range &r) { iterator i; @@ -69,7 +70,8 @@ class range_map } template - bool intersect(const Range &r) + bool + intersect(const Range &r) { iterator i; i = find(r); @@ -80,7 +82,8 @@ class range_map template - iterator insert(const Range &r, const W d) + iterator + insert(const Range &r, const W d) { if (intersect(r)) return tree.end(); @@ -88,42 +91,50 @@ class range_map return tree.insert(std::make_pair,V>(r, d)).first; } - size_t erase(T k) + size_t + erase(T k) { return tree.erase(k); } - void erase(iterator p) + void + erase(iterator p) { tree.erase(p); } - void erase(iterator p, iterator q) + void + erase(iterator p, iterator q) { tree.erase(p,q); } - void clear() + void + clear() { tree.erase(tree.begin(), tree.end()); } - iterator begin() + iterator + begin() { return tree.begin(); } - iterator end() + iterator + end() { return tree.end(); } - size_t size() + size_t + size() { return tree.size(); } - bool empty() + bool + empty() { return tree.empty(); } @@ -180,7 +191,8 @@ class range_multimap } template - bool intersect(const Range &r) + bool + intersect(const Range &r) { std::pair p; p = find(r); @@ -191,7 +203,8 @@ class range_multimap template - iterator insert(const Range &r, const W d) + iterator + insert(const Range &r, const W d) { std::pair p; p = find(r); @@ -202,42 +215,50 @@ class range_multimap return tree.end(); } - size_t erase(T k) + size_t + erase(T k) { return tree.erase(k); } - void erase(iterator p) + void + erase(iterator p) { tree.erase(p); } - void erase(iterator p, iterator q) + void + erase(iterator p, iterator q) { tree.erase(p,q); } - void clear() + void + clear() { tree.erase(tree.begin(), tree.end()); } - iterator begin() + iterator + begin() { return tree.begin(); } - iterator end() + iterator + end() { return tree.end(); } - size_t size() + size_t + size() { return tree.size(); } - bool empty() + bool + empty() { return tree.empty(); } -- cgit v1.2.3