[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kdeutil/kde/util
From: Tim Jansen <tim () tjansen ! de>
Date: 2003-10-26 16:13:03
[Download RAW message or body]
CVS commit by tjansen:
make casts more restrictive
M +6 -8 smartptr.h 1.10
--- kdenonbeta/kdeutil/kde/util/smartptr.h #1.9:1.10
@@ -275,5 +275,5 @@ public:
template<class T2>
SmartPtr &operator=(const SmartPtr<T2> &sptr) {
- if (this == static_cast<SmartPtr<T> >(&sptr))
+ if (((void*)this) == (void*)(&sptr))
return *this;
@@ -345,7 +345,6 @@ public:
* @see release()
*/
- template<class T2>
- operator T2*() const {
- return (T2*)ptr;
+ operator T*() {
+ return ptr;
}
@@ -359,7 +358,6 @@ public:
* @see release()
*/
- template<class T2>
- operator const T2*() const {
- return static_cast<const T2*>(ptr);
+ operator const T*() const {
+ return (const T*)ptr;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic