summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2011-04-13 09:32:18 -0700
committerNathan Binkert <nate@binkert.org>2011-04-13 09:32:18 -0700
commite748d921fd56644ec41fe58a578b4df3ed1874bb (patch)
treed182d73581c7847bffef34735632a42080163d35 /src
parent9d94d48a7d94ea0e18e35d5974ea70bb641e7640 (diff)
downloadgem5-e748d921fd56644ec41fe58a578b4df3ed1874bb.tar.xz
refcnt: Inline comparison functions
Diffstat (limited to 'src')
-rw-r--r--src/base/refcnt.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/base/refcnt.hh b/src/base/refcnt.hh
index 1c10cc0ea..df15294d1 100644
--- a/src/base/refcnt.hh
+++ b/src/base/refcnt.hh
@@ -97,27 +97,27 @@ class RefCountingPtr
};
template<class T>
-bool operator==(const RefCountingPtr<T> &l, const RefCountingPtr<T> &r)
+inline bool operator==(const RefCountingPtr<T> &l, const RefCountingPtr<T> &r)
{ return l.get() == r.get(); }
template<class T>
-bool operator==(const RefCountingPtr<T> &l, const T *r)
+inline bool operator==(const RefCountingPtr<T> &l, const T *r)
{ return l.get() == r; }
template<class T>
-bool operator==(const T *l, const RefCountingPtr<T> &r)
+inline bool operator==(const T *l, const RefCountingPtr<T> &r)
{ return l == r.get(); }
template<class T>
-bool operator!=(const RefCountingPtr<T> &l, const RefCountingPtr<T> &r)
+inline bool operator!=(const RefCountingPtr<T> &l, const RefCountingPtr<T> &r)
{ return l.get() != r.get(); }
template<class T>
-bool operator!=(const RefCountingPtr<T> &l, const T *r)
+inline bool operator!=(const RefCountingPtr<T> &l, const T *r)
{ return l.get() != r; }
template<class T>
-bool operator!=(const T *l, const RefCountingPtr<T> &r)
+inline bool operator!=(const T *l, const RefCountingPtr<T> &r)
{ return l != r.get(); }
#endif // __BASE_REFCNT_HH__