From: Tomasz Iwanek Date: Tue, 4 Dec 2012 15:14:50 +0000 (+0100) Subject: SharedFromTHis replace by STL C++0x ones X-Git-Tag: submit/trunk/20121210.022115~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89998aed20d3105477cbf7f4bfddf5f9d7a78471;p=platform%2Fframework%2Fweb%2Fwrt-commons.git SharedFromTHis replace by STL C++0x ones [Issue#] N/A [Bug] Build break for wrt-extra [Cause] Methods were not instantiatedduring wrt-commons build [Solution] Fix shared_froM_this() [Verification] Build wrt-extra based on wrt-commons Change-Id: Ia5b304acd7e44c4147b9509ca27789ed60dc432d --- diff --git a/modules/event/include/dpl/event/inter_context_delegate.h b/modules/event/include/dpl/event/inter_context_delegate.h index 745e84a..78efd5f 100644 --- a/modules/event/include/dpl/event/inter_context_delegate.h +++ b/modules/event/include/dpl/event/inter_context_delegate.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -194,7 +193,7 @@ class ICDelegate ICD::Reuse reuse) { ICDSharedData* hlp = new ICDSharedData(base, outerDelegate, reuse); - m_helper.Reset(hlp); + m_helper.reset(hlp); } // Calling operator will pass all args passed to it to correct context and @@ -203,7 +202,7 @@ class ICDelegate { Assert(m_helper); ICDPrivate::ICDSharedDataBase::ScopedLock lock( - DPL::StaticPointerCast(m_helper)); + std::static_pointer_cast(m_helper)); m_helper->CallDelegate(args ...); } @@ -212,7 +211,7 @@ class ICDelegate { Assert(m_helper); ICDPrivate::ICDSharedDataBase::ScopedLock lock( - DPL::StaticPointerCast(m_helper)); + std::static_pointer_cast(m_helper)); m_helper->disable(); } @@ -220,7 +219,7 @@ class ICDelegate ICDPrivate::ICDSharedDataBase::ICDSharedDataBasePtr getRelatedICDSharedData() const { - return DPL::StaticPointerCast(m_helper); + return std::static_pointer_cast(m_helper); } private: @@ -245,7 +244,7 @@ class ICDelegate typedef DPL::FastDelegate ICDSharedDataDelegateType; class ICDSharedData : private DPL::Event::EventSupport, - private std::enable_shared_from_this, + public std::enable_shared_from_this, public ICDPrivate::ICDSharedDataBase { public: @@ -268,10 +267,10 @@ class ICDelegate void CallDelegate(ArgTypesList ... args) { ICDPrivate::ICDSharedDataBase::ScopedLock lock( - DPL::StaticPointerCast( - this->SharedFromThis())); + std::static_pointer_cast( + this->shared_from_this())); if (!isDisabled()) { - EmitEvent(PrivateEvent(this->SharedFromThis(), + EmitEvent(PrivateEvent(this->shared_from_this(), args ...)); } } @@ -279,8 +278,8 @@ class ICDelegate virtual void disable() { ICDPrivate::ICDSharedDataBase::ICDSharedDataBasePtr ptr( - DPL::StaticPointerCast( - this->SharedFromThis())); + std::static_pointer_cast( + this->shared_from_this())); ICDPrivate::ICDSharedDataBase::ScopedLock lock(ptr); if (!isDisabled()) { ICDPrivate::ICDSharedDataBase::disable(); @@ -299,7 +298,7 @@ class ICDelegate void delegateForwarder(const PrivateEvent& event) { ICDPrivate::ICDSharedDataBase::ICDSharedDataBasePtr ptr( - DPL::StaticPointerCast(event.helper)); + std::static_pointer_cast(event.helper)); ICDPrivate::ICDSharedDataBase::ScopedLock lock(ptr); Assert(!m_outerDelegate.empty());