From 45d3e865e375e8b1e76045d45323ac795018ebc6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 21 Apr 2012 16:03:53 +1000 Subject: Use C++ casts instead of C casts to avoid warnings from cppcheck. --- gtk/PlatGTK.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index b7ce38568..acaf60a42 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1355,7 +1355,7 @@ struct ListImage { }; static void list_image_free(gpointer, gpointer value, gpointer) { - ListImage *list_image = (ListImage *) value; + ListImage *list_image = static_cast(value); if (list_image->pixbuf) g_object_unref(list_image->pixbuf); g_free(list_image); @@ -1659,8 +1659,8 @@ static void init_pixmap(ListImage *list_image) { void ListBoxX::Append(char *s, int type) { ListImage *list_image = NULL; if ((type >= 0) && pixhash) { - list_image = (ListImage *) g_hash_table_lookup((GHashTable *) pixhash - , (gconstpointer) GINT_TO_POINTER(type)); + list_image = static_cast(g_hash_table_lookup((GHashTable *) pixhash + , (gconstpointer) GINT_TO_POINTER(type))); } GtkTreeIter iter; GtkListStore *store = @@ -1825,8 +1825,8 @@ void ListBoxX::RegisterRGBA(int type, RGBAImage *image) { if (!pixhash) { pixhash = g_hash_table_new(g_direct_hash, g_direct_equal); } - ListImage *list_image = (ListImage *) g_hash_table_lookup((GHashTable *) pixhash, - (gconstpointer) GINT_TO_POINTER(type)); + ListImage *list_image = static_cast(g_hash_table_lookup((GHashTable *) pixhash, + (gconstpointer) GINT_TO_POINTER(type))); if (list_image) { // Drop icon already registered if (list_image->pixbuf) -- cgit v1.2.3