[3.0] Fix SVACE issue 51/141651/1 accepted/tizen/3.0/common/20170808.135321 accepted/tizen/3.0/ivi/20170808.070706 accepted/tizen/3.0/mobile/20170808.070636 accepted/tizen/3.0/tv/20170808.070623 accepted/tizen/3.0/wearable/20170808.070648 submit/tizen_3.0/20170807.060155
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 1 Aug 2017 08:08:13 +0000 (17:08 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 1 Aug 2017 08:11:15 +0000 (17:11 +0900)
- There is a SVACE issue that 'The result of integral division converted into
floating point at atlas-mesh-factory.cpp:86'.
- However, we have purposely made the value as we do not want the remainder in that
expression to affect the value of fBlockY.

Change-Id: If4a12a7ba6d439e3d8c412a6879214d32e464561
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali-toolkit/internal/text/rendering/atlas/atlas-mesh-factory.cpp

index 4da6c1f..c82fb5f 100644 (file)
@@ -83,6 +83,9 @@ void CreateQuad( SizeType imageWidth,
   Vector2 topLeft = Vector2( position.x - 0.5f, position.y - 0.5f );
 
   float fBlockX = texelBlockWidth * static_cast< float >( block % atlasWidthInBlocks );
+
+  // In the next expression, we have purposely made ( block / atlasWidthInBlocks ) yield an integer value and then convert to float as
+  // we do not want the remainder in that expression to affect the value of fBlockY
   float fBlockY = texelBlockHeight * static_cast< float >( block / atlasWidthInBlocks );
 
   // Add on texture filtering compensation ( half a texel plus compensation for filled pixel in top left corner )