CanvasRenderer: Do not use c-style type cast 28/262528/1
authorJunsuChoi <jsuya.choi@samsung.com>
Fri, 13 Aug 2021 01:40:29 +0000 (10:40 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 13 Aug 2021 01:40:29 +0000 (10:40 +0900)
changed to static_cast or const_cast

Change-Id: I64ea9cee3b6f0fa2cde3a0445427ac3c10d361cb

dali/internal/canvas-renderer/tizen/drawable-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/gradient-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/shape-impl-tizen.cpp
dali/internal/canvas-renderer/ubuntu/drawable-impl-ubuntu.cpp
dali/internal/canvas-renderer/ubuntu/gradient-impl-ubuntu.cpp
dali/internal/canvas-renderer/ubuntu/shape-impl-ubuntu.cpp

index b4a53bd..fcc7092 100644 (file)
@@ -317,7 +317,7 @@ void DrawableTizen::SetObject(const void* object)
 #ifdef THORVG_SUPPORT
   if(object)
   {
-    mTvgPaint = static_cast<tvg::Paint*>((void*)object);
+    mTvgPaint = static_cast<tvg::Paint*>(const_cast<void*>(object));
   }
 #endif
 }
index 562b739..97081c3 100644 (file)
@@ -176,7 +176,7 @@ void GradientTizen::SetObject(const void* object)
 #ifdef THORVG_SUPPORT
   if(object)
   {
-    mTvgFill = static_cast<tvg::Fill*>((void*)object);
+    mTvgFill = static_cast<tvg::Fill*>(const_cast<void*>(object));
   }
 #endif
 }
index 1665f96..23bca2c 100644 (file)
@@ -208,7 +208,7 @@ bool ShapeTizen::AddPath(Dali::CanvasRenderer::Shape::PathCommands& pathCommand)
     return false;
   }
 
-  if(static_cast<tvg::Shape*>(mTvgShape)->appendPath(reinterpret_cast<const tvg::PathCommand*>(pathCommand.mCommands), pathCommand.mCommandCount, static_cast<const tvg::Point*>((void*)pathCommand.mPoints), pathCommand.mPointCount) != tvg::Result::Success)
+  if(static_cast<tvg::Shape*>(mTvgShape)->appendPath(reinterpret_cast<const tvg::PathCommand*>(pathCommand.mCommands), pathCommand.mCommandCount, static_cast<const tvg::Point*>(static_cast<void*>(pathCommand.mPoints)), pathCommand.mPointCount) != tvg::Result::Success)
   {
     DALI_LOG_ERROR("AddPath() fail.\n");
     return false;
index 3808448..d841bb5 100644 (file)
@@ -317,7 +317,7 @@ void DrawableUbuntu::SetObject(const void* object)
 #ifdef THORVG_SUPPORT
   if(object)
   {
-    mTvgPaint = static_cast<tvg::Paint*>((void*)object);
+    mTvgPaint = static_cast<tvg::Paint*>(const_cast<void*>(object));
   }
 #endif
 }
index 350a2c1..4c9594c 100644 (file)
@@ -176,7 +176,7 @@ void GradientUbuntu::SetObject(const void* object)
 #ifdef THORVG_SUPPORT
   if(object)
   {
-    mTvgFill = static_cast<tvg::Fill*>((void*)object);
+    mTvgFill = static_cast<tvg::Fill*>(const_cast<void*>(object));
   }
 #endif
 }
index 758dc97..17fd079 100644 (file)
@@ -208,7 +208,7 @@ bool ShapeUbuntu::AddPath(Dali::CanvasRenderer::Shape::PathCommands& pathCommand
     return false;
   }
 
-  if(static_cast<tvg::Shape*>(mTvgShape)->appendPath(reinterpret_cast<const tvg::PathCommand*>(pathCommand.mCommands), pathCommand.mCommandCount, static_cast<const tvg::Point*>((void*)pathCommand.mPoints), pathCommand.mPointCount) != tvg::Result::Success)
+  if(static_cast<tvg::Shape*>(mTvgShape)->appendPath(reinterpret_cast<const tvg::PathCommand*>(pathCommand.mCommands), pathCommand.mCommandCount, static_cast<const tvg::Point*>(static_cast<void*>(pathCommand.mPoints)), pathCommand.mPointCount) != tvg::Result::Success)
   {
     DALI_LOG_ERROR("AddPath() fail.\n");
     return false;