aboutsummaryrefslogtreecommitdiff
path: root/src/sptr.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-07-12 22:52:13 +0000
committerMike Buland <eichlan@xagasoft.com>2007-07-12 22:52:13 +0000
commitd093a607848aa4cce99729d9b301f4888dfa66db (patch)
tree9fdabd3d3c3bfeb7b474a72f9c41b3abff298050 /src/sptr.h
parentc67327f6d1b76de4212e70881ce5ca7e07ab096c (diff)
downloadlibbu++-d093a607848aa4cce99729d9b301f4888dfa66db.tar.gz
libbu++-d093a607848aa4cce99729d9b301f4888dfa66db.tar.bz2
libbu++-d093a607848aa4cce99729d9b301f4888dfa66db.tar.xz
libbu++-d093a607848aa4cce99729d9b301f4888dfa66db.zip
The SPtr now has != comparison operators
Diffstat (limited to '')
-rw-r--r--src/sptr.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sptr.h b/src/sptr.h
index 75851a6..bccf887 100644
--- a/src/sptr.h
+++ b/src/sptr.h
@@ -139,6 +139,26 @@ namespace Bu
139 { 139 {
140 return pData == src; 140 return pData == src;
141 } 141 }
142
143 /**
144 * Not equals comparison operator.
145 *@param src (const SPtr<T> &) The SPtr to compare to.
146 *@returns (bool) Are the equal?
147 */
148 bool operator!=( const SPtr<T> &src ) const
149 {
150 return !(pData == src.pData);
151 }
152
153 /**
154 * Not equals comparison operator.
155 *@param src (const T *) The pointer to compare to.
156 *@returns (bool) Are the equal?
157 */
158 bool operator!=( const T *src ) const
159 {
160 return !(pData == src);
161 }
142 162
143 /** 163 /**
144 * Boolean cast operator. Do we have a pointer? 164 * Boolean cast operator. Do we have a pointer?