]> git.saurik.com Git - wxWidgets.git/commitdiff
No real changes, just remove some unnecessary casts.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:41:28 +0000 (17:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:41:28 +0000 (17:41 +0000)
Use correct GdkRectangle* type for wxDataViewCustomRenderer::xxx_area members
instead of casting them to and from void*.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/dvrenderers.h
src/gtk/dataview.cpp

index 845a938d34d8a66c328fb50753c5cdc275382853..7f6cb0777ec943ca791ec0084826cc85e22efbf0 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef _WX_GTK_DVRENDERERS_H_
 #define _WX_GTK_DVRENDERERS_H_
 
+typedef struct _GdkRectangle GdkRectangle;
+
 // ---------------------------------------------------------
 // wxDataViewTextRenderer
 // ---------------------------------------------------------
@@ -124,9 +126,9 @@ public:
     GtkCellRenderer      *m_text_renderer;
     GdkWindow            *window;
     GtkWidget            *widget;
-    void                 *background_area;
-    void                 *cell_area;
-    void                 *expose_area;
+    GdkRectangle         *background_area;
+    GdkRectangle         *cell_area;
+    GdkRectangle         *expose_area;
     int                   flags;
 
 protected:
index 5a5b89c2daecf00ae1c71d75648e5f0f8bf9b30e..c0f03ab35ab531b5c4b1ea7f6702a308f8d63860 100644 (file)
@@ -1224,10 +1224,10 @@ gtk_wx_cell_renderer_render (GtkCellRenderer      *renderer,
 
     cell->window = window;
     cell->widget = widget;
-    cell->background_area = (void*) background_area;
-    cell->cell_area = (void*) cell_area;
-    cell->expose_area = (void*) expose_area;
-    cell->flags = (int) flags;
+    cell->background_area = background_area;
+    cell->cell_area = cell_area;
+    cell->expose_area = expose_area;
+    cell->flags = flags;
 
     GdkRectangle rect;
     gtk_wx_cell_renderer_get_size (renderer, widget, cell_area,
@@ -2064,19 +2064,19 @@ void wxDataViewCustomRenderer::RenderText( const wxString &text, int xoffset,
     g_object_set_property( G_OBJECT(m_text_renderer), "text", &gvalue );
     g_value_unset( &gvalue );
 
-    ((GdkRectangle*) cell_area)->x += xoffset;
-    ((GdkRectangle*) cell_area)->width -= xoffset;
+    cell_area->x += xoffset;
+    cell_area->width -= xoffset;
 
     gtk_cell_renderer_render( m_text_renderer,
         window,
         widget,
-        (GdkRectangle*) background_area,
-        (GdkRectangle*) cell_area,
-        (GdkRectangle*) expose_area,
+        background_area,
+        cell_area,
+        expose_area,
         (GtkCellRendererState) flags );
 
-    ((GdkRectangle*) cell_area)->x -= xoffset;
-    ((GdkRectangle*) cell_area)->width += xoffset;
+    cell_area->x -= xoffset;
+    cell_area->width += xoffset;
 #endif
 }