From 6d74e6592cc93f6c740a306092a16b486b3f2f69 Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Mon, 9 Feb 2015 11:47:23 +0000 Subject: [PATCH] Remove unnecessary stage parameter from connnect to stage Change-Id: If1c878669227cf0913e7ad6117610dbc4d5f7c3f --- dali/internal/event/actors/actor-impl.cpp | 12 +++++------- dali/internal/event/actors/actor-impl.h | 5 ++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index a06b19e..0c5f138 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -2108,14 +2108,14 @@ Actor::~Actor() delete mAnchorPoint; } -void Actor::ConnectToStage( Stage& stage, int index ) +void Actor::ConnectToStage( int index ) { // This container is used instead of walking the Actor hierachy. // It protects us when the Actor hierachy is modified during OnStageConnectionExternal callbacks. ActorContainer connectionList; // This stage is atomic i.e. not interrupted by user callbacks - RecursiveConnectToStage( stage, connectionList, index ); + RecursiveConnectToStage( connectionList, index ); // Notify applications about the newly connected actors. const ActorIter endIter = connectionList.end(); @@ -2126,7 +2126,7 @@ void Actor::ConnectToStage( Stage& stage, int index ) } } -void Actor::RecursiveConnectToStage( Stage& stage, ActorContainer& connectionList, int index ) +void Actor::RecursiveConnectToStage( ActorContainer& connectionList, int index ) { DALI_ASSERT_ALWAYS( !OnStage() ); @@ -2147,7 +2147,7 @@ void Actor::RecursiveConnectToStage( Stage& stage, ActorContainer& connectionLis for( ActorIter iter = mChildren->begin(); iter != endIter; ++iter ) { Actor& actor = GetImplementation( *iter ); - actor.RecursiveConnectToStage( stage, connectionList ); + actor.RecursiveConnectToStage( connectionList ); } } } @@ -3378,10 +3378,8 @@ void Actor::SetParent(Actor* parent, int index) if ( Stage::IsInstalled() && // Don't emit signals or send messages during Core destruction parent->OnStage() ) { - StagePtr stage = parent->mStage; - // Instruct each actor to create a corresponding node in the scene graph - ConnectToStage(*stage, index); + ConnectToStage( index ); } } else // parent being set to NULL diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index df1bff7..50c58fb 100644 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -1081,16 +1081,15 @@ protected: * @param[in] stage The stage. * @param[in] index If set, it is only used for positioning the actor within the parent's child list. */ - void ConnectToStage(Stage& stage, int index = -1); + void ConnectToStage( int index = -1 ); /** * Helper for ConnectToStage, to recursively connect a tree of actors. * This is atomic i.e. not interrupted by user callbacks. - * @param[in] stage The stage. * @param[in] index If set, it is only used for positioning the actor within the parent's child list. * @param[out] connectionList On return, the list of connected actors which require notification. */ - void RecursiveConnectToStage( Stage& stage, ActorContainer& connectionList, int index = -1 ); + void RecursiveConnectToStage( ActorContainer& connectionList, int index = -1 ); /** * Connect the Node associated with this Actor to the scene-graph. -- 2.7.4