Revert "[Tizen] Fix -Werror=old-style-cast error" 38/134838/1
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 20 Jun 2017 06:56:19 +0000 (15:56 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 20 Jun 2017 06:56:22 +0000 (15:56 +0900)
This reverts commit c63dd66b8d81d1f9323dd1d0524afb76ce9dde68.

Change-Id: If8dd64668df8b760db7ec993bc4e089244f8771f

adaptors/ecore/wayland/key-grab-ecore-wl.cpp

index 892ba53..85f92c3 100755 (executable)
@@ -98,8 +98,8 @@ Dali::Vector<bool> GrabKeyList( Window window, const Dali::Vector<Dali::KEY>& da
 
   for( Dali::Vector<float>::SizeType index = 0; index < keyCount; ++index )
   {
-    Ecore_Wl_Window_Keygrab_Info *info = static_cast<Ecore_Wl_Window_Keygrab_Info*>(malloc(sizeof(Ecore_Wl_Window_Keygrab_Info)));
-    info->key = const_cast<char*>(Dali::Internal::Adaptor::KeyLookup::GetKeyName( daliKeyVector[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] );
 
     switch(grabModeVector[index])
     {
@@ -137,7 +137,7 @@ Dali::Vector<bool> GrabKeyList( Window window, const Dali::Vector<Dali::KEY>& da
       Dali::Vector<float>::SizeType index = 0;
       EINA_LIST_FOREACH(keyList, l, listData)
       {
-        if(strcmp(static_cast<char*>(data), (static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData))->key) == 0)
+        if(strcmp((char*)data, ((Ecore_Wl_Window_Keygrab_Info*)listData)->key) == 0)
           resultVector[index] = false;
 
         ++index;
@@ -167,8 +167,8 @@ Dali::Vector<bool> UngrabKeyList( Window window, const Dali::Vector<Dali::KEY>&
 
   for( Dali::Vector<float>::SizeType index = 0; index < keyCount; ++index )
   {
-    Ecore_Wl_Window_Keygrab_Info *info = static_cast<Ecore_Wl_Window_Keygrab_Info*>(malloc(sizeof(Ecore_Wl_Window_Keygrab_Info)));
-    info->key = const_cast<char*>(Dali::Internal::Adaptor::KeyLookup::GetKeyName( daliKeyVector[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] );
     keyList = eina_list_append(keyList, info);
   }
 
@@ -186,7 +186,7 @@ Dali::Vector<bool> UngrabKeyList( Window window, const Dali::Vector<Dali::KEY>&
       Dali::Vector<float>::SizeType index = 0;
       EINA_LIST_FOREACH(keyList, l, listData)
       {
-        if(strcmp(static_cast<char*>(data), (static_cast<Ecore_Wl_Window_Keygrab_Info*>(listData))->key) == 0)
+        if(strcmp((char*)data, ((Ecore_Wl_Window_Keygrab_Info*)listData)->key) == 0)
           resultVector[index] = false;
 
         ++index;