Remove unsafe boost style conversion from intrusive pointer to raw pointer 91/34791/1
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Mon, 2 Feb 2015 18:17:28 +0000 (18:17 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Mon, 2 Feb 2015 18:17:28 +0000 (18:17 +0000)
[Problem] potential lifecycle issue with functor
[Cause] raw pointer taken from intrusive pointer
[Solution] remove automatic conversion functions

Change-Id: I9354e1ae93f3a4266a945840350fb493fa2d197c

dali/public-api/common/intrusive-ptr.h

index 5eb1883..cabf58d 100644 (file)
@@ -104,7 +104,7 @@ public:
   }
 
   /**
-   * @brief Pointer operator ovveride.
+   * @brief Pointer operator override.
    *
    * @return pointer to reference counted object
    */
@@ -282,30 +282,6 @@ inline bool operator!=( T* lhs, IntrusivePtr<U>const& rhs )
   return lhs != rhs.Get();
 }
 
-/**
- * @brief Get pointer to reference counted object (Dali camel case variant)
- *
- * @param rhs intrusive pointer wrapping object
- * @return pointer to object
- */
-template<typename T>
-inline T* GetPointer(IntrusivePtr<T> const& rhs)
-{
-  return rhs.Get();
-}
-
-/**
- * @brief Get pointer to reference counted object (boost:: naming convention)
- *
- * @param rhs intrusive pointer wrapping object
- * @return pointer to object
- */
-template<typename T>
-inline T* get_pointer(IntrusivePtr<T> const& rhs)
-{
-  return rhs.Get();
-}
-
 } // namespace Dali
 
 #endif /* __DALI_INTRUSIVE_PTR_H__ */