From: Keuckdo Bang Date: Tue, 24 Sep 2013 01:22:10 +0000 (+0900) Subject: Removed unnecessary variable. X-Git-Tag: accepted/tizen/20131002.165803^2~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5c73fc7b92b59588cfca754d45a85f694902407;p=platform%2Fframework%2Fnative%2Fuifw.git Removed unnecessary variable. Change-Id: Ieac98cd3cb4479696681452b49bd484a62df2be5 --- diff --git a/src/ui/FUi_Control.cpp b/src/ui/FUi_Control.cpp index 98a4bb0..2474f67 100644 --- a/src/ui/FUi_Control.cpp +++ b/src/ui/FUi_Control.cpp @@ -3882,7 +3882,10 @@ _Control::SetBackgroundColor(const Color& color) _Control::~_Control(void) { - __destroying = true; + if (!__destroying) + { + __destroying = true; + } DoBacktrace(__pDeleteBacktrace.get()); @@ -4405,6 +4408,18 @@ _Control::DoBacktrace(Tizen::Base::Collection::ArrayListT* pBacktraceList } } +void +_Control::SetDestroying(bool destroying) +{ + __destroying = destroying; +} + +bool +_Control::IsDestroying(void) const +{ + return __destroying; +} + Tizen::Base::String _Control::GetDescription(void) const { diff --git a/src/ui/FUi_Window.cpp b/src/ui/FUi_Window.cpp index 353590c..1bae845 100644 --- a/src/ui/FUi_Window.cpp +++ b/src/ui/FUi_Window.cpp @@ -78,7 +78,7 @@ CATCH: _Window::~_Window(void) { - __destroying = true; + SetDestroying(true); Close(); SetOwner(null); @@ -116,7 +116,7 @@ _Window::~_Window(void) _IWindowDelegate& _Window::GetWindowDelegate(void) const { - if (__destroying) + if (_Control::IsDestroying()) { return const_cast<_Window&>(*this); } @@ -132,7 +132,7 @@ _Window::GetDescription(void) const String descriptionTemp(L""); descriptionTemp.Format(LOG_LEN_MAX, L"_Window: xid(0x%x) owner(0x%x) delegate(0x%x) activated(%d) destroying(%d) displayContext(0x%x)", - GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, __destroying, __pDisplayContext); + GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, _Control::IsDestroying(), __pDisplayContext); description.Append(descriptionTemp); @@ -921,7 +921,6 @@ _Window::_Window() , __pOwner(null) , __pWindowDelegate(null) , __activated(false) - , __destroying(false) , __pRootVisualElement(null) , __pLayer(null) , __pDimmingLayer(null) @@ -960,7 +959,7 @@ _Window::Deactivate(void) { __activated = false; - if (__destroying == false) + if (_Control::IsDestroying() == false) { GetWindowDelegate().OnDeactivated(); } diff --git a/src/ui/inc/FUi_Control.h b/src/ui/inc/FUi_Control.h index f4f2f45..e25334e 100644 --- a/src/ui/inc/FUi_Control.h +++ b/src/ui/inc/FUi_Control.h @@ -602,6 +602,8 @@ protected: void AcquireHandle(void); void SetDataBindingContext(_DataBindingContext* pDataBindingContext); void DoBacktrace(Tizen::Base::Collection::ArrayListT* pBacktraceList); + void SetDestroying(bool destroying); + bool IsDestroying(void) const; private: _Control(const _Control& rhs); diff --git a/src/ui/inc/FUi_Window.h b/src/ui/inc/FUi_Window.h index 6d523c3..db01d0b 100644 --- a/src/ui/inc/FUi_Window.h +++ b/src/ui/inc/FUi_Window.h @@ -161,7 +161,6 @@ private: _Control* __pOwner; _IWindowDelegate* __pWindowDelegate; bool __activated; - bool __destroying; Tizen::Ui::Animations::_RootVisualElement* __pRootVisualElement; Tizen::Ui::Animations::_NativeLayer* __pLayer;