From a406f1b25745f1604e3f651b527167aec0f0ad22 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Tue, 11 Nov 2014 16:01:16 +0000 Subject: [PATCH] Updates after the use of const refs in gesture callbacks Change-Id: I231053cbaf99764247615dad6ba9677458181a13 --- examples/builder/examples.cpp | 2 +- examples/item-view/item-view-example.cpp | 10 +++++----- examples/motion/motion-blur-example.cpp | 2 +- examples/motion/motion-stretch-example.cpp | 2 +- examples/shader-effect/dissolve-effect-example.cpp | 4 ++-- examples/shadows/shadow-bone-lighting-example.cpp | 6 +++--- examples/transition/cube-transition-effect-example.cpp | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index 1c30aaf..1f98958 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -393,7 +393,7 @@ public: SetTitle("View"); } - void OnTap( Actor actor, TapGesture tap ) + void OnTap( Actor actor, const TapGesture& tap ) { ItemId id = mItemView.GetItemId( actor ); diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index aa61789..9697cc7 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -534,7 +534,7 @@ public: mTapDetector.Reset(); } - void RemoveOnTap( Actor actor, TapGesture tap ) + void RemoveOnTap( Actor actor, const TapGesture& tap ) { mItemView.RemoveItem( mItemView.GetItemId(actor), 0.5f ); } @@ -586,7 +586,7 @@ public: mDeleteButton.SetVisible( false ); } - void SelectOnTap( Actor actor, TapGesture tap ) + void SelectOnTap( Actor actor, const TapGesture& tap ) { Actor tick = actor.FindChildByName( "Tick" ); if( tick ) @@ -637,7 +637,7 @@ public: mTapDetector.Reset(); } - void InsertOnTap( Actor actor, TapGesture tap ) + void InsertOnTap( Actor actor, const TapGesture& tap ) { ItemId id = mItemView.GetItemId( actor ); @@ -730,7 +730,7 @@ public: mTapDetector.DetectedSignal().Connect( this, &ItemViewExample::ReplaceOnTap ); } - void ReplaceOnTap( Actor actor, TapGesture tap ) + void ReplaceOnTap( Actor actor, const TapGesture& tap ) { mItemView.ReplaceItem( Item( mItemView.GetItemId(actor), NewItem(rand()) ), 0.5f ); } @@ -1037,7 +1037,7 @@ private: return true; } - void ChangeAlphaFunctionOnTap( Actor actor, TapGesture tap ) + void ChangeAlphaFunctionOnTap( Actor actor, const TapGesture& tap ) { if( NUM_ALPHA_FUNCTIONS <= ++mAlphaFuncIndex ) { diff --git a/examples/motion/motion-blur-example.cpp b/examples/motion/motion-blur-example.cpp index 2d8a095..4100f44 100644 --- a/examples/motion/motion-blur-example.cpp +++ b/examples/motion/motion-blur-example.cpp @@ -331,7 +331,7 @@ public: // // move to point on screen that was tapped - void OnTap( Actor actor, TapGesture tapGesture ) + void OnTap( Actor actor, const TapGesture& tapGesture ) { Vector3 destPos; float originOffsetX, originOffsetY; diff --git a/examples/motion/motion-stretch-example.cpp b/examples/motion/motion-stretch-example.cpp index c4d3f12..db224ae 100644 --- a/examples/motion/motion-stretch-example.cpp +++ b/examples/motion/motion-stretch-example.cpp @@ -243,7 +243,7 @@ public: // // move to point on screen that was tapped - void OnTap( Actor actor, TapGesture tapGesture ) + void OnTap( Actor actor, const TapGesture& tapGesture ) { Vector3 destPos; float originOffsetX, originOffsetY; diff --git a/examples/shader-effect/dissolve-effect-example.cpp b/examples/shader-effect/dissolve-effect-example.cpp index 211b325..327c08c 100644 --- a/examples/shader-effect/dissolve-effect-example.cpp +++ b/examples/shader-effect/dissolve-effect-example.cpp @@ -96,7 +96,7 @@ private: * @param[in] actor The actor receiving the pan gesture. * @param[in] gesture The detected pan gesture. */ - void OnPanGesture( Actor actor, PanGesture gesture ); + void OnPanGesture( Actor actor, const PanGesture& gesture ); /** * Set up the animations for transition @@ -237,7 +237,7 @@ void DissolveEffectApp::OnInit( Application& application ) } // signal handler, called when the pan gesture is detected -void DissolveEffectApp::OnPanGesture( Actor actor, PanGesture gesture ) +void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) { // does not response when the animation has not finished if( mIsTransiting || mSlideshow ) diff --git a/examples/shadows/shadow-bone-lighting-example.cpp b/examples/shadows/shadow-bone-lighting-example.cpp index b1a97f4..1246be2 100644 --- a/examples/shadows/shadow-bone-lighting-example.cpp +++ b/examples/shadows/shadow-bone-lighting-example.cpp @@ -326,7 +326,7 @@ public: return p*q; } - void OnTap(Dali::Actor actor, TapGesture gesture) + void OnTap(Dali::Actor actor, const TapGesture& gesture) { if( ! mPaused ) { @@ -342,7 +342,7 @@ public: } } - void OnPan(Actor actor, PanGesture gesture) + void OnPan(Actor actor, const PanGesture& gesture) { switch (gesture.state) { @@ -396,7 +396,7 @@ public: } } - void OnPinch(Actor actor, PinchGesture gesture) + void OnPinch(Actor actor, const PinchGesture& gesture) { if (gesture.state == Gesture::Started) { diff --git a/examples/transition/cube-transition-effect-example.cpp b/examples/transition/cube-transition-effect-example.cpp index a441136..bd0d0a7 100644 --- a/examples/transition/cube-transition-effect-example.cpp +++ b/examples/transition/cube-transition-effect-example.cpp @@ -110,7 +110,7 @@ private: * @param[in] actor The actor receiving the pan gesture. * @param[in] gesture The detected pan gesture. */ - void OnPanGesture( Actor actor, PanGesture gesture ); + void OnPanGesture( Actor actor, const PanGesture& gesture ); /** * Load the next image and start the transition; */ @@ -281,7 +281,7 @@ void CubeTransitionApp::OnInit( Application& application ) } // signal handler, called when the pan gesture is detected -void CubeTransitionApp::OnPanGesture( Actor actor, PanGesture gesture ) +void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture ) { // does not response when the transition has not finished if( mIsImageLoading || mCubeWaveEffect.IsTransiting() || mCubeCrossEffect.IsTransiting() || mCubeFoldEffect.IsTransiting() || mSlideshow ) -- 2.7.4