From 368e910834eeb8d9bcd57293b26b49415f932d2b Mon Sep 17 00:00:00 2001 From: Nick Holland Date: Tue, 12 May 2015 14:03:52 +0100 Subject: [PATCH] Remove ActorContainer typedef Also removed some unnecessary includes of from public-api files Change-Id: I158193751290c01614f2a05211dd629bb5cf04fd --- .../src/dali-internal/utc-Dali-Internal-Image-Culling.cpp | 2 +- dali/internal/event/actors/actor-impl.h | 2 +- dali/internal/event/events/hit-test-algorithm-impl.cpp | 4 ++-- dali/internal/event/size-negotiation/relayout-controller-impl.cpp | 8 ++++---- dali/internal/event/size-negotiation/relayout-controller-impl.h | 3 +-- dali/public-api/actors/actor.h | 8 -------- dali/public-api/actors/custom-actor-impl.h | 1 - dali/public-api/events/hover-event.h | 1 - dali/public-api/events/touch-event.h | 1 - dali/public-api/images/buffer-image.h | 1 - dali/public-api/images/nine-patch-image.h | 1 - dali/public-api/render-tasks/render-task-list.h | 1 - 12 files changed, 9 insertions(+), 24 deletions(-) diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp index e911d39..e55d3e1 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp @@ -423,7 +423,7 @@ void TestPlaneOfImages(TestApplication& application, float z) // Create a grid of 9 x 9 actors; only the central 3x3 are in viewport - ActorContainer actors; + std::vector< Actor > actors; for( int i = 0; i < NUM_ROWS*NUM_COLS; i++ ) { GLuint textureId = TEXTURE_ID_OFFSET+i; diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index 9ca8845..faf1705 100644 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -57,7 +57,7 @@ class RenderTask; struct DynamicsData; typedef IntrusivePtr< Actor > ActorPtr; -typedef Dali::ActorContainer ActorContainer; // Store handles to return via public-api +typedef std::vector< Dali::Actor > ActorContainer; // Store handles to return via public-api typedef ActorContainer::iterator ActorIter; typedef ActorContainer::const_iterator ActorConstIter; diff --git a/dali/internal/event/events/hit-test-algorithm-impl.cpp b/dali/internal/event/events/hit-test-algorithm-impl.cpp index b3eb5ad..e43d5fa 100644 --- a/dali/internal/event/events/hit-test-algorithm-impl.cpp +++ b/dali/internal/event/events/hit-test-algorithm-impl.cpp @@ -207,12 +207,12 @@ HitActor HitTestWithinLayer( Actor& actor, if( actor.GetChildCount() > 0 ) { childHit.distance = std::numeric_limits::max(); - Dali::ActorContainer& children = actor.GetChildrenInternal(); + ActorContainer& children = actor.GetChildrenInternal(); // Hit test ALL children and calculate their distance. bool parentIsRenderable = actor.IsRenderable(); - for (Dali::ActorIter iter = children.begin(), endIter = children.end(); iter != endIter; ++iter) + for( ActorIter iter = children.begin(), endIter = children.end(); iter != endIter; ++iter ) { // Descend tree only if... if ( !iter->IsLayer() && // Child is NOT a layer, hit testing current layer only or Child is not a layer and we've inherited the stencil draw mode diff --git a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp index 6fa43f3..91f0ad9 100644 --- a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp +++ b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp @@ -144,8 +144,8 @@ void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension::Type di return; } - Dali::ActorContainer potentialRedundantSubRoots; - Dali::ActorContainer topOfSubTreeStack; + std::vector< Dali::Actor > potentialRedundantSubRoots; + std::vector< Dali::Actor > topOfSubTreeStack; topOfSubTreeStack.push_back( actor ); @@ -176,7 +176,7 @@ void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension::Type di } // Remove any redundant sub-tree heads - for( ActorContainer::iterator it = potentialRedundantSubRoots.begin(), itEnd = potentialRedundantSubRoots.end(); it != itEnd; ++it ) + for( std::vector< Dali::Actor >::iterator it = potentialRedundantSubRoots.begin(), itEnd = potentialRedundantSubRoots.end(); it != itEnd; ++it ) { Dali::Actor subRoot = *it; @@ -232,7 +232,7 @@ void RelayoutController::RequestRelayoutTree( Dali::Actor& actor ) } } -void RelayoutController::PropagateAll( Dali::Actor& actor, Dimension::Type dimension, Dali::ActorContainer& topOfSubTreeStack, Dali::ActorContainer& potentialRedundantSubRoots ) +void RelayoutController::PropagateAll( Dali::Actor& actor, Dimension::Type dimension, std::vector< Dali::Actor >& topOfSubTreeStack, std::vector< Dali::Actor >& potentialRedundantSubRoots ) { // Only set dirty flag if doing relayout and not already marked as dirty Actor& actorImpl = GetImplementation( actor ); diff --git a/dali/internal/event/size-negotiation/relayout-controller-impl.h b/dali/internal/event/size-negotiation/relayout-controller-impl.h index 7c5b39c..aa277c5 100644 --- a/dali/internal/event/size-negotiation/relayout-controller-impl.h +++ b/dali/internal/event/size-negotiation/relayout-controller-impl.h @@ -22,7 +22,6 @@ #include #include #include - #include #include @@ -163,7 +162,7 @@ private: * @param[in] topOfSubTreeStack The top of the sub tree that this actor is in * @param[in] potentialRedundantSubRoots Actors collected as potentially already being included in relayout */ - void PropagateAll( Dali::Actor& actor, Dimension::Type dimension, Dali::ActorContainer& topOfSubTreeStack, Dali::ActorContainer& potentialRedundantSubRoots ); + void PropagateAll( Dali::Actor& actor, Dimension::Type dimension, std::vector< Dali::Actor >& topOfSubTreeStack, std::vector< Dali::Actor >& potentialRedundantSubRoots ); /** * Queue an actor on the relayout container diff --git a/dali/public-api/actors/actor.h b/dali/public-api/actors/actor.h index 918fd1d..2de01a8 100644 --- a/dali/public-api/actors/actor.h +++ b/dali/public-api/actors/actor.h @@ -22,7 +22,6 @@ #include // INTERNAL INCLUDES -#include #include #include #include @@ -50,13 +49,6 @@ struct Vector2; struct Vector3; struct Vector4; -/** - * @brief Actor container. - */ -typedef std::vector ActorContainer; -typedef ActorContainer::iterator ActorIter; ///< Iterator for Dali::ActorContainer -typedef ActorContainer::const_iterator ActorConstIter; ///< Const iterator for Dali::ActorContainer - typedef Rect Padding; ///< Padding definition /** diff --git a/dali/public-api/actors/custom-actor-impl.h b/dali/public-api/actors/custom-actor-impl.h index 18803df..9f459a5 100644 --- a/dali/public-api/actors/custom-actor-impl.h +++ b/dali/public-api/actors/custom-actor-impl.h @@ -19,7 +19,6 @@ */ // INTERNAL INCLUDES -#include #include #include #include diff --git a/dali/public-api/events/hover-event.h b/dali/public-api/events/hover-event.h index 42219af..fde089a 100644 --- a/dali/public-api/events/hover-event.h +++ b/dali/public-api/events/hover-event.h @@ -19,7 +19,6 @@ */ // INTERNAL INCLUDES -#include #include #include diff --git a/dali/public-api/events/touch-event.h b/dali/public-api/events/touch-event.h index d6b5465..e61c5ff 100644 --- a/dali/public-api/events/touch-event.h +++ b/dali/public-api/events/touch-event.h @@ -19,7 +19,6 @@ */ // INTERNAL INCLUDES -#include #include #include diff --git a/dali/public-api/images/buffer-image.h b/dali/public-api/images/buffer-image.h index dbcd428..51164b3 100644 --- a/dali/public-api/images/buffer-image.h +++ b/dali/public-api/images/buffer-image.h @@ -19,7 +19,6 @@ */ // INTERNAL INCLUDES -#include #include #include #include diff --git a/dali/public-api/images/nine-patch-image.h b/dali/public-api/images/nine-patch-image.h index 16a0046..caa2e5c 100644 --- a/dali/public-api/images/nine-patch-image.h +++ b/dali/public-api/images/nine-patch-image.h @@ -19,7 +19,6 @@ */ // INTERNAL INCLUDES -#include #include #include #include diff --git a/dali/public-api/render-tasks/render-task-list.h b/dali/public-api/render-tasks/render-task-list.h index 104dcc0..7e94f88 100644 --- a/dali/public-api/render-tasks/render-task-list.h +++ b/dali/public-api/render-tasks/render-task-list.h @@ -19,7 +19,6 @@ */ // INTERNAL INCLUDES -#include #include namespace Dali -- 2.7.4