diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/binder/IBinder.h | 2 | ||||
-rw-r--r-- | include/utils/StrongPointer.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/binder/IBinder.h b/include/binder/IBinder.h index 749a977..81b56c2 100644 --- a/include/binder/IBinder.h +++ b/include/binder/IBinder.h @@ -98,7 +98,7 @@ public: * Register the @a recipient for a notification if this binder * goes away. If this binder object unexpectedly goes away * (typically because its hosting process has been killed), - * then DeathRecipient::binderDied() will be called with a referene + * then DeathRecipient::binderDied() will be called with a reference * to this. * * The @a cookie is optional -- if non-NULL, it should be a diff --git a/include/utils/StrongPointer.h b/include/utils/StrongPointer.h index a8c9897..49fa3a8 100644 --- a/include/utils/StrongPointer.h +++ b/include/utils/StrongPointer.h @@ -133,7 +133,7 @@ sp<T>::sp(const sp<T>& other) template<typename T> template<typename U> sp<T>::sp(U* other) : m_ptr(other) { - if (other) other->incStrong(this); + if (other) ((T*)other)->incStrong(this); } template<typename T> template<typename U> @@ -170,7 +170,7 @@ sp<T>& sp<T>::operator = (T* other) template<typename T> template<typename U> sp<T>& sp<T>::operator = (const sp<U>& other) { - U* otherPtr(other.m_ptr); + T* otherPtr(other.m_ptr); if (otherPtr) otherPtr->incStrong(this); if (m_ptr) m_ptr->decStrong(this); m_ptr = otherPtr; @@ -180,7 +180,7 @@ sp<T>& sp<T>::operator = (const sp<U>& other) template<typename T> template<typename U> sp<T>& sp<T>::operator = (U* other) { - if (other) other->incStrong(this); + if (other) ((T*)other)->incStrong(this); if (m_ptr) m_ptr->decStrong(this); m_ptr = other; return *this; |