Use intptr_t for pointer offset magic in TexTool. Fixes a couple compiler warnings.

This commit is contained in:
jdolan 2013-07-07 09:58:56 -04:00
parent 3ddd0fca0c
commit 2f403e160b

View file

@ -37,7 +37,7 @@ static void dialog_button_callback( GtkWidget *widget, gpointer data ){
ret = (int*)g_object_get_data( G_OBJECT( parent ), "ret" ); ret = (int*)g_object_get_data( G_OBJECT( parent ), "ret" );
*loop = 0; *loop = 0;
*ret = (int)data; *ret = (intptr_t) data;
} }
static gint dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){ static gint dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){
@ -243,7 +243,7 @@ const char* QERPlug_Init( void* hApp, void *pWidget ){
GtkWidget* pMainWidget = static_cast<GtkWidget*>( pWidget ); GtkWidget* pMainWidget = static_cast<GtkWidget*>( pWidget );
g_pMainWnd = pMainWidget; g_pMainWnd = pMainWidget;
size = (int)( (winding_t *)0 )->points[MAX_POINTS_ON_WINDING]; size = (intptr_t)( (winding_t *)0 )->points[MAX_POINTS_ON_WINDING];
g_pSelectedFaceWinding = (winding_t *)malloc( size ); g_pSelectedFaceWinding = (winding_t *)malloc( size );
memset( g_pSelectedFaceWinding, 0, size ); memset( g_pSelectedFaceWinding, 0, size );
return "Texture tools for Radiant"; return "Texture tools for Radiant";