From: Anton Obzhirov Date: Mon, 15 Jul 2019 14:07:53 +0000 (+0100) Subject: Add extra std headers and use fabs, fround where needed. X-Git-Tag: dali_1.4.29~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=badf37081ad290803c67e03c3393e57a304546b4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Add extra std headers and use fabs, fround where needed. Change-Id: I3192ac905e99de922c47955c32d748c727b26f0f --- diff --git a/dali-toolkit/devel-api/builder/tree-node.cpp b/dali-toolkit/devel-api/builder/tree-node.cpp index 3d9eed7..f8473ad 100644 --- a/dali-toolkit/devel-api/builder/tree-node.cpp +++ b/dali-toolkit/devel-api/builder/tree-node.cpp @@ -16,7 +16,9 @@ */ // EXTERNAL INCLUDES +#include #include +#include #include // INTERNAL INCLUDES diff --git a/dali-toolkit/internal/builder/json-parser-state.cpp b/dali-toolkit/internal/builder/json-parser-state.cpp index 3691838..636bac1 100644 --- a/dali-toolkit/internal/builder/json-parser-state.cpp +++ b/dali-toolkit/internal/builder/json-parser-state.cpp @@ -19,6 +19,7 @@ #include // EXTERNAL INCLUDES +#include #include namespace Dali diff --git a/dali-toolkit/internal/image-loader/atlas-packer.cpp b/dali-toolkit/internal/image-loader/atlas-packer.cpp index 26ad3e0..4becddf 100644 --- a/dali-toolkit/internal/image-loader/atlas-packer.cpp +++ b/dali-toolkit/internal/image-loader/atlas-packer.cpp @@ -19,7 +19,7 @@ #include "atlas-packer.h" // EXTERNAL HEADER -#include // For abs() +#include // For abs() #include namespace Dali @@ -36,7 +36,7 @@ namespace bool ApproximatelyEqual( uint32_t a, uint32_t b ) { - return abs( a-b ) <= 1; + return std::abs( static_cast( a - b ) ) <= 1; } uint16_t MaxDimension( const Uint16Pair& dimensions ) diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index b35ce74..9d1b93d 100755 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include #include #include @@ -397,7 +398,7 @@ struct Engine::Impl const GlyphInfo& glyph = *( glyphsBuffer + i ); Vector2& position = *( glyphPositionsBuffer + i ); - position.x = std::round( penX + glyph.xBearing ); + position.x = std::roundf( penX + glyph.xBearing ); position.y = -glyph.yBearing; penX += ( glyph.advance + interGlyphExtraAdvance ); diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index a7b098a..5ca9858 100755 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include #include #include #include @@ -1440,7 +1441,7 @@ const std::string& Controller::GetDefaultOutlineProperties() const bool Controller::SetDefaultLineSpacing( float lineSpacing ) { - if( std::abs(lineSpacing - mImpl->mLayoutEngine.GetDefaultLineSpacing()) > Math::MACHINE_EPSILON_1000 ) + if( std::fabs( lineSpacing - mImpl->mLayoutEngine.GetDefaultLineSpacing() ) > Math::MACHINE_EPSILON_1000 ) { mImpl->mLayoutEngine.SetDefaultLineSpacing(lineSpacing); mImpl->mRecalculateNaturalSize = true;