Lines Matching refs:other
57 static inline sp<T> fromExisting(T* other);
64 sp(T* other); // NOLINT(implicit)
66 sp(U* other); // NOLINT(implicit)
67 sp& operator=(T* other);
69 sp& operator=(U* other);
72 sp(const sp<T>& other);
73 sp(sp<T>&& other) noexcept;
75 template<typename U> sp(const sp<U>& other); // NOLINT(implicit)
76 template<typename U> sp(sp<U>&& other); // NOLINT(implicit)
82 static inline sp<T> cast(const sp<U>& other);
88 sp& operator = (const sp<T>& other);
89 sp& operator=(sp<T>&& other) noexcept;
91 template<typename U> sp& operator = (const sp<U>& other);
92 template<typename U> sp& operator = (sp<U>&& other);
95 void force_set(T* other);
204 sp<T> sp<T>::fromExisting(T* other) { in fromExisting() argument
205 if (other) { in fromExisting()
206 other->incStrongRequireStrong(other); in fromExisting()
208 result.m_ptr = other; in fromExisting()
216 sp<T>::sp(T* other) in sp() argument
217 : m_ptr(other) { in sp()
218 if (other) { in sp()
219 other->incStrong(this); in sp()
225 sp<T>::sp(U* other) : m_ptr(other) { in sp() argument
226 if (other) { in sp()
227 (static_cast<T*>(other))->incStrong(this); in sp()
232 sp<T>& sp<T>::operator=(T* other) {
234 if (other) {
235 other->incStrong(this);
239 m_ptr = other;
245 sp<T>::sp(const sp<T>& other) in sp() argument
246 : m_ptr(other.m_ptr) { in sp()
252 sp<T>::sp(sp<T>&& other) noexcept : m_ptr(other.m_ptr) { in sp() argument
253 other.m_ptr = nullptr; in sp()
257 sp<T>::sp(const sp<U>& other) in sp() argument
258 : m_ptr(other.m_ptr) { in sp()
264 sp<T>::sp(sp<U>&& other) in sp() argument
265 : m_ptr(other.m_ptr) { in sp()
266 other.m_ptr = nullptr; in sp()
271 sp<T> sp<T>::cast(const sp<U>& other) { in cast() argument
272 return sp<T>::fromExisting(static_cast<T*>(other.get())); in cast()
282 sp<T>& sp<T>::operator =(const sp<T>& other) {
285 T* otherPtr(other.m_ptr);
294 sp<T>& sp<T>::operator=(sp<T>&& other) noexcept {
298 m_ptr = other.m_ptr;
299 other.m_ptr = nullptr;
304 sp<T>& sp<T>::operator =(const sp<U>& other) {
306 T* otherPtr(other.m_ptr);
315 sp<T>& sp<T>::operator =(sp<U>&& other) {
319 m_ptr = other.m_ptr;
320 other.m_ptr = nullptr;
326 sp<T>& sp<T>::operator =(U* other) {
328 if (other) (static_cast<T*>(other))->incStrong(this);
331 m_ptr = other;
337 void sp<T>::force_set(T* other) { in force_set() argument
338 other->forceIncStrong(this); in force_set()
339 m_ptr = other; in force_set()