X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fanimation%2Flinear-constrainer-impl.cpp;h=41f624887486f2624a8c83060c68c5cbcc5972fb;hb=ae9aa6c8f6feaa85138ef7ca5a13b280923989a2;hp=593e62b277646fbf983c6b85916d824eb0748adc;hpb=7882128f66bc91dbca9573caddd312115be440c4;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/animation/linear-constrainer-impl.cpp b/dali/internal/event/animation/linear-constrainer-impl.cpp index 593e62b..41f6248 100644 --- a/dali/internal/event/animation/linear-constrainer-impl.cpp +++ b/dali/internal/event/animation/linear-constrainer-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -119,12 +119,15 @@ Property::Value LinearConstrainer::GetDefaultProperty( Property::Index index ) c { Property::Value value( Property::ARRAY ); Property::Array* array = value.GetArray(); - DALI_ASSERT_DEBUG( array ); // should always exist in this case size_t count( mValue.Size() ); - array->Reserve( count ); - for( size_t i( 0 ); i != count; ++i ) + + if( array ) { - array->PushBack( mValue[i] ); + array->Reserve( count ); + for( size_t i( 0 ); i != count; ++i ) + { + array->PushBack( mValue[i] ); + } } return value; } @@ -132,12 +135,15 @@ Property::Value LinearConstrainer::GetDefaultProperty( Property::Index index ) c { Property::Value value( Property::ARRAY ); Property::Array* array = value.GetArray(); - DALI_ASSERT_DEBUG( array ); // should always exist in this case - size_t count( mValue.Size() ); - array->Reserve( count ); - for( size_t i( 0 ); i != count; ++i ) + size_t count( mProgress.Size() ); + + if( array ) { - array->PushBack( mProgress[i] ); + array->Reserve( count ); + for( size_t i( 0 ); i != count; ++i ) + { + array->PushBack( mProgress[i] ); + } } return value; } @@ -145,6 +151,11 @@ Property::Value LinearConstrainer::GetDefaultProperty( Property::Index index ) c return Property::Value(); } +Property::Value LinearConstrainer::GetDefaultPropertyCurrentValue( Property::Index index ) const +{ + return GetDefaultProperty( index ); // Event-side only properties +} + void LinearConstrainer::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ) { const Property::Array* array = propertyValue.GetArray();