From: Eunki, Hong Date: Fri, 4 Nov 2022 14:43:25 +0000 (+0900) Subject: [Tizen] Fix Svace issue for 64bit X-Git-Tag: accepted/tizen/unified/20221110.181457^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfb16c0dbc52b529ac39869a667524605f5ea0bb;p=platform%2Fcore%2Fuifw%2Fdali-core.git [Tizen] Fix Svace issue for 64bit Solve some convert from size_t to uint32_t case. Change-Id: I486feb48eab38201aaae3bf9f2aadc0414789a5d Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/event/actors/actor-coords.cpp b/dali/internal/event/actors/actor-coords.cpp index 4ee6566..d1a70db 100644 --- a/dali/internal/event/actors/actor-coords.cpp +++ b/dali/internal/event/actors/actor-coords.cpp @@ -502,9 +502,12 @@ Matrix CalculateActorWorldTransform(const Actor& actor) Matrix worldMatrix; Vector3 localPosition; + // descentList is leaf first, so traverse from root (end) to leaf (beginning) - for(unsigned int i(descentList.size() - 1); i < descentList.size(); --i) + const size_t descentCount = descentList.size(); + for(size_t iter = 0u; iter < descentCount; ++iter) { + auto i = descentCount - iter - 1u; Vector3 anchorPoint = descentList[i].GetProperty(Dali::Actor::Property::ANCHOR_POINT); Vector3 parentOrigin = descentList[i].GetProperty(Dali::Actor::Property::PARENT_ORIGIN); bool positionUsesAnchorPoint = descentList[i].GetProperty(Dali::Actor::Property::POSITION_USES_ANCHOR_POINT); @@ -589,9 +592,11 @@ Vector4 CalculateActorWorldColor(const Actor& actor) currentActor = currentActor.GetParent(); } while(inheritance != Dali::ColorMode::USE_OWN_COLOR && currentActor); - Vector4 worldColor; - for(unsigned int i(descentList.size() - 1); i < descentList.size(); --i) + Vector4 worldColor; + const size_t descentCount = descentList.size(); + for(size_t iter = 0u; iter < descentCount; ++iter) { + auto i = descentCount - iter - 1u; if(inheritanceModeList[i] == USE_OWN_COLOR || i == descentList.size() - 1) { worldColor = descentList[i].GetProperty(Dali::Actor::Property::COLOR); diff --git a/dali/public-api/rendering/texture-set.cpp b/dali/public-api/rendering/texture-set.cpp index 6f9fa6b..b59d0bc 100644 --- a/dali/public-api/rendering/texture-set.cpp +++ b/dali/public-api/rendering/texture-set.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -86,7 +86,7 @@ Sampler TextureSet::GetSampler(size_t index) const return Dali::Sampler(samplerPtr); } -size_t TextureSet::GetTextureCount() const +uint32_t TextureSet::GetTextureCount() const { return GetImplementation(*this).GetTextureCount(); } diff --git a/dali/public-api/rendering/texture-set.h b/dali/public-api/rendering/texture-set.h index abdce8c..f1525e6 100644 --- a/dali/public-api/rendering/texture-set.h +++ b/dali/public-api/rendering/texture-set.h @@ -2,7 +2,7 @@ #define DALI_TEXTURE_SET_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -154,7 +154,7 @@ public: * @SINCE_1_1.43 * @return The number of textures in the TextureSet */ - size_t GetTextureCount() const; + uint32_t GetTextureCount() const; public: /**