X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-view.cpp;h=effc31a73aef1a4205ce919e1bad0d732c6b5d26;hp=398939e983e8c01945dac5e62e7d8afffdda9d16;hb=d886d0a7b8637b2ad52844096091b63991157ff3;hpb=06990b10c42c9f1ec0ec3c44b690d83b8b14b366 diff --git a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp index 398939e..effc31a 100644 --- a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp +++ b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.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. @@ -190,7 +190,7 @@ FixedRuler::FixedRuler(float spacing) { if(fabsf(mSpacing) <= Math::MACHINE_EPSILON_1) { - DALI_LOG_ERROR( "Page spacing too small (%f).", double(spacing) ); + DALI_LOG_ERROR( "Page spacing too small (%f).\n", double(spacing) ); mSpacing = spacing >= 0.0f ? Math::MACHINE_EPSILON_1 : -Math::MACHINE_EPSILON_1; } mType = Fixed; @@ -248,7 +248,7 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const { position = WrapInDomain(position, mDomain.min, mDomain.max); } - page = std::max(static_cast(0.0f), floor((position - mDomain.min) / mSpacing + 0.5f)); + page = std::max(static_cast(0.0f), static_cast(floor((position - mDomain.min) / mSpacing + 0.5f))); if(wrap) { @@ -257,7 +257,7 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const if(pagesPerVolume < 1u) { pagesPerVolume = 1u; - DALI_LOG_ERROR("Ruler domain(%f) is smaller than its spacing(%f).", mDomain.GetSize() * 1.0, mSpacing * 1.0 ); + DALI_LOG_ERROR("Ruler domain(%f) is smaller than its spacing(%f).\n", mDomain.GetSize() * 1.0, mSpacing * 1.0 ); } page %= pagesPerVolume; } @@ -298,19 +298,13 @@ ScrollView::ScrollView( Dali::Internal::CustomActor* internal ) VerifyCustomActorPointer(internal); } -ScrollView::ScrollView( const ScrollView& handle ) -: Scrollable( handle ) -{ -} +ScrollView::ScrollView( const ScrollView& handle ) = default; -ScrollView& ScrollView::operator=( const ScrollView& handle ) -{ - if( &handle != this ) - { - Control::operator=( handle ); - } - return *this; -} +ScrollView::ScrollView( ScrollView&& rhs ) = default; + +ScrollView& ScrollView::operator=( const ScrollView& handle ) = default; + +ScrollView& ScrollView::operator=( ScrollView&& rhs ) = default; ScrollView ScrollView::New() {