X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali%2Fpublic-api%2Fanimation%2Fpath.cpp;h=133ae946c5973c52eb521ac26ceb899784754f34;hb=0b501ba800a263b97d99adf224fc42d0c2aa8b37;hp=da34a19f0e96e370bf2351491e61f8709a30f043;hpb=199d46a42f943543a9d43cc3166a0d8b7cf63fd4;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/animation/path.cpp b/dali/public-api/animation/path.cpp index da34a19..133ae94 100644 --- a/dali/public-api/animation/path.cpp +++ b/dali/public-api/animation/path.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -16,78 +16,69 @@ */ // CLASS HEADER -#include #include +#include // INTERNAL INCLUDES namespace Dali { - Path Path::New() { Internal::Path* internal = Internal::Path::New(); return Path(internal); } -Path Path::DownCast( BaseHandle handle ) +Path Path::DownCast(BaseHandle handle) { - return Path( dynamic_cast(handle.GetObjectPtr()) ); + return Path(dynamic_cast(handle.GetObjectPtr())); } -Path::Path() -{ -} +Path::Path() = default; -Path::~Path() -{ -} +Path::~Path() = default; -Path::Path(const Path& handle) -:Handle(handle) -{ -} +Path::Path(const Path& handle) = default; Path::Path(Internal::Path* internal) : Handle(internal) { } -Path& Path::operator=(const Path& rhs) -{ - BaseHandle::operator=(rhs); - return *this; -} +Path& Path::operator=(const Path& rhs) = default; -void Path::AddPoint(const Vector3& point ) +Path::Path(Path&& rhs) noexcept = default; + +Path& Path::operator=(Path&& rhs) noexcept = default; + +void Path::AddPoint(const Vector3& point) { - GetImplementation(*this).AddPoint( point ); + GetImplementation(*this).AddPoint(point); } -void Path::AddControlPoint(const Vector3& point ) +void Path::AddControlPoint(const Vector3& point) { - GetImplementation(*this).AddControlPoint( point ); + GetImplementation(*this).AddControlPoint(point); } -void Path::GenerateControlPoints( float curvature ) +void Path::GenerateControlPoints(float curvature) { - GetImplementation(*this).GenerateControlPoints( curvature ); + GetImplementation(*this).GenerateControlPoints(curvature); } - -void Path::Sample( float progress, Vector3& position, Vector3& tangent ) const +void Path::Sample(float progress, Vector3& position, Vector3& tangent) const { - GetImplementation(*this).Sample( progress, position, tangent ); + GetImplementation(*this).Sample(progress, position, tangent); } -Vector3& Path::GetPoint( size_t index ) +Vector3& Path::GetPoint(size_t index) { - return GetImplementation(*this).GetPoint(index); + return GetImplementation(*this).GetPoint(static_cast(index)); } -Vector3& Path::GetControlPoint( size_t index ) +Vector3& Path::GetControlPoint(size_t index) { - return GetImplementation(*this).GetControlPoint(index); + return GetImplementation(*this).GetControlPoint(static_cast(index)); } size_t Path::GetPointCount() const @@ -95,4 +86,4 @@ size_t Path::GetPointCount() const return GetImplementation(*this).GetPointCount(); } -} // Dali +} // namespace Dali