[dali_1.0.22] Merge branch 'tizen'
[platform/core/uifw/dali-core.git] / dali / internal / event / object / custom-object-internal.cpp
index 372ef1f..4a0ae90 100644 (file)
@@ -31,11 +31,6 @@ using Dali::Internal::SceneGraph::PropertyBase;
 using Dali::Internal::SceneGraph::UpdateManager;
 using Dali::Internal::SceneGraph::AnimatableProperty;
 
-namespace
-{
-const std::string INVALID_PROPERTY_NAME;
-}
-
 namespace Dali
 {
 
@@ -59,15 +54,9 @@ const SceneGraph::PropertyOwner* CustomObject::GetSceneObject() const
 
 const PropertyBase* CustomObject::GetSceneObjectAnimatableProperty( Property::Index index ) const
 {
-  const PropertyBase* property( NULL );
-
-  CustomPropertyLookup::const_iterator entry = GetCustomPropertyLookup().find( index );
-
-  DALI_ASSERT_ALWAYS( GetCustomPropertyLookup().end() != entry && "index is invalid" );
-
-  property = dynamic_cast<const PropertyBase*>( entry->second.GetSceneGraphProperty() );
-
-  return property;
+  CustomProperty* custom = FindCustomProperty( index );
+  DALI_ASSERT_ALWAYS( custom && "Property index is invalid" );
+  return custom->GetSceneGraphProperty();;
 }
 
 const PropertyInputImpl* CustomObject::GetSceneObjectInputProperty( Property::Index index ) const
@@ -84,9 +73,9 @@ void CustomObject::GetDefaultPropertyIndices( Property::IndexContainer& indices
 {
 }
 
-const std::string& CustomObject::GetDefaultPropertyName( Property::Index index ) const
+const char* CustomObject::GetDefaultPropertyName( Property::Index index ) const
 {
-  return INVALID_PROPERTY_NAME;
+  return NULL;
 }
 
 Property::Index CustomObject::GetDefaultPropertyIndex(const std::string& name) const