Fix various SVACE errors
[platform/core/uifw/dali-core.git] / dali / internal / event / events / pan-gesture-detector-impl.cpp
index 0531670..a66e15f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -291,7 +291,7 @@ void PanGestureDetector::SetSceneObject( const SceneGraph::PanGesture* object )
 bool PanGestureDetector::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
 {
   bool connected( true );
-  PanGestureDetector* gesture = dynamic_cast<PanGestureDetector*>(object);
+  PanGestureDetector* gesture = static_cast< PanGestureDetector* >(object); // TypeRegistry guarantees that this is the correct type.
 
   if ( 0 == strcmp( signalName.c_str(), SIGNAL_PAN_DETECTED ) )
   {
@@ -538,7 +538,8 @@ const PropertyInputImpl* PanGestureDetector::GetSceneObjectInputProperty( Proper
     return property;
   }
 
-  if ( index >= DEFAULT_PROPERTY_MAX_COUNT )
+  if ( ( index >= CHILD_PROPERTY_REGISTRATION_START_INDEX ) && // Child properties are also stored as custom properties
+       ( index <= PROPERTY_CUSTOM_MAX_INDEX ) )
   {
     CustomPropertyMetadata* custom = FindCustomProperty( index );
     DALI_ASSERT_ALWAYS( custom && "Property index is invalid" );