From c63dd66b8d81d1f9323dd1d0524afb76ce9dde68 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Tue, 13 Jun 2017 11:05:07 +0900 Subject: [PATCH 1/1] [Tizen] Fix -Werror=old-style-cast error This reverts commit ee839f59c4e1fd369ee012bf24bd982a0a43fe15. Change-Id: I27d970d4d107f4a06ee7153cc9cba97eba438aef --- adaptors/ecore/wayland/key-grab-ecore-wl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; -- 2.7.4