rlottie: fix old style cast.
authorsub.mohanty@samsung.com <smohantty@gmail.com>
Sat, 29 Jun 2019 14:57:15 +0000 (23:57 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 10 Jul 2019 01:56:17 +0000 (10:56 +0900)
src/vector/vimageloader.cpp

index b28330efcb8a574d8b56845145a24d0fe125cf87..77ce58a1e6b8645bd41f25b08856f0f320c03ff7 100644 (file)
@@ -49,21 +49,23 @@ struct VImageLoader::Impl {
     }
     void init()
     {
-        imageLoad =
-            (lottie_image_load_f)GetProcAddress(dl_handle, "lottie_image_load");
-        imageFree =
-            (lottie_image_free_f)GetProcAddress(dl_handle, "lottie_image_free");
-        imageFromData = (lottie_image_load_data_f)GetProcAddress(
-            dl_handle, "lottie_image_load_from_data");
+        imageLoad = reinterpret_cast<lottie_image_load_f>(
+                    GetProcAddress(dl_handle, "lottie_image_load"));
+        imageFree = reinterpret_cast<lottie_image_free_f>(
+                    GetProcAddress(dl_handle, "lottie_image_free"));
+        imageFromData = reinterpret_cast<lottie_image_load_data_f>(
+                        GetProcAddress(dl_handle, "lottie_image_load_from_data"));
     }
 #else
     void *dl_handle{nullptr};
     void  init()
     {
-        imageLoad = (lottie_image_load_f)dlsym(dl_handle, "lottie_image_load");
-        imageFree = (lottie_image_free_f)dlsym(dl_handle, "lottie_image_free");
-        imageFromData = (lottie_image_load_data_f)dlsym(
-            dl_handle, "lottie_image_load_from_data");
+        imageLoad = reinterpret_cast<lottie_image_load_f>(
+                    dlsym(dl_handle, "lottie_image_load"));
+        imageFree = reinterpret_cast<lottie_image_free_f>(
+                    dlsym(dl_handle, "lottie_image_free"));
+        imageFromData = reinterpret_cast<lottie_image_load_data_f>(
+                    dlsym(dl_handle, "lottie_image_load_from_data"));
     }
 
     void moduleFree()