From: minho.sun Date: Wed, 7 Jun 2017 06:11:38 +0000 (+0900) Subject: [Tizen] Fix -Werror=old-style-cast error X-Git-Tag: accepted/tizen/unified/20170608.072248^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=9641fa686caba7bdfd831745fc06d36f39c37477 [Tizen] Fix -Werror=old-style-cast error Fix -Werror=old-style-cast error Change-Id: I217529fd796de3766d16eee69b806728f5ffed54 Signed-off-by: minho.sun --- diff --git a/adaptors/ecore/wayland/key-grab-ecore-wl.cpp b/adaptors/ecore/wayland/key-grab-ecore-wl.cpp index 85f92c3..892ba53 100755 --- a/adaptors/ecore/wayland/key-grab-ecore-wl.cpp +++ b/adaptors/ecore/wayland/key-grab-ecore-wl.cpp @@ -98,8 +98,8 @@ Dali::Vector GrabKeyList( Window window, const Dali::Vector& da for( Dali::Vector::SizeType index = 0; index < keyCount; ++index ) { - Ecore_Wl_Window_Keygrab_Info *info = (Ecore_Wl_Window_Keygrab_Info*)malloc(sizeof(Ecore_Wl_Window_Keygrab_Info)); - info->key = (char*)Dali::Internal::Adaptor::KeyLookup::GetKeyName( daliKeyVector[index] ); + Ecore_Wl_Window_Keygrab_Info *info = static_cast(malloc(sizeof(Ecore_Wl_Window_Keygrab_Info))); + info->key = const_cast(Dali::Internal::Adaptor::KeyLookup::GetKeyName( daliKeyVector[index] )); switch(grabModeVector[index]) { @@ -137,7 +137,7 @@ Dali::Vector GrabKeyList( Window window, const Dali::Vector& da Dali::Vector::SizeType index = 0; EINA_LIST_FOREACH(keyList, l, listData) { - if(strcmp((char*)data, ((Ecore_Wl_Window_Keygrab_Info*)listData)->key) == 0) + if(strcmp(static_cast(data), (static_cast(listData))->key) == 0) resultVector[index] = false; ++index; @@ -167,8 +167,8 @@ Dali::Vector UngrabKeyList( Window window, const Dali::Vector& for( Dali::Vector::SizeType index = 0; index < keyCount; ++index ) { - Ecore_Wl_Window_Keygrab_Info *info = (Ecore_Wl_Window_Keygrab_Info*)malloc(sizeof(Ecore_Wl_Window_Keygrab_Info)); - info->key = (char*)Dali::Internal::Adaptor::KeyLookup::GetKeyName( daliKeyVector[index] ); + Ecore_Wl_Window_Keygrab_Info *info = static_cast(malloc(sizeof(Ecore_Wl_Window_Keygrab_Info))); + info->key = const_cast(Dali::Internal::Adaptor::KeyLookup::GetKeyName( daliKeyVector[index] )); keyList = eina_list_append(keyList, info); } @@ -186,7 +186,7 @@ Dali::Vector UngrabKeyList( Window window, const Dali::Vector& Dali::Vector::SizeType index = 0; EINA_LIST_FOREACH(keyList, l, listData) { - if(strcmp((char*)data, ((Ecore_Wl_Window_Keygrab_Info*)listData)->key) == 0) + if(strcmp(static_cast(data), (static_cast(listData))->key) == 0) resultVector[index] = false; ++index; diff --git a/adaptors/tizen/accessibility-adaptor-impl-tizen.cpp b/adaptors/tizen/accessibility-adaptor-impl-tizen.cpp index 588cfae..65ba859 100644 --- a/adaptors/tizen/accessibility-adaptor-impl-tizen.cpp +++ b/adaptors/tizen/accessibility-adaptor-impl-tizen.cpp @@ -52,7 +52,7 @@ bool GetEnabledVConf() vconf_get_bool( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled ); } - return (bool)isEnabled; + return static_cast(isEnabled); } #if defined(DEBUG_ENABLED)