diff options
author | Ken Hughes <khughes@pacific.edu> | 2008-04-18 04:21:40 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2008-04-18 04:21:40 +0400 |
commit | 60de9d9b2f748381e35bb4f73351f7293292d78a (patch) | |
tree | 01483a6fe893243363418d025b6532c2310128ec /source | |
parent | be0b8ccfaaa98118468c8fec971792ab1123eaca (diff) |
More changes to GET_INT_FROM_POINTER and SET_INT_IN_POINTER to get rid of
other warnings that only occurred with 64bit systems. Wish I'd known about
these macros earlier!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/booleanops.c | 4 | ||||
-rw-r--r-- | source/blender/src/buttons_editing.c | 14 | ||||
-rw-r--r-- | source/blender/src/buttons_logic.c | 4 | ||||
-rw-r--r-- | source/blender/src/buttons_scene.c | 2 | ||||
-rw-r--r-- | source/blender/src/drawimage.c | 2 | ||||
-rw-r--r-- | source/blender/src/editface.c | 6 |
6 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/src/booleanops.c b/source/blender/src/booleanops.c index 4c9e594b5f9..14766d1f746 100644 --- a/source/blender/src/booleanops.c +++ b/source/blender/src/booleanops.c @@ -396,10 +396,10 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh( if (!BLI_ghash_haskey(material_hash, orig_mat)) { mat[*totmat] = orig_mat; mat_nr = mface->mat_nr = (*totmat)++; - BLI_ghash_insert(material_hash, orig_mat, (void*)mat_nr); + BLI_ghash_insert(material_hash, orig_mat, SET_INT_IN_POINTER(mat_nr)); } else - mface->mat_nr = (int)BLI_ghash_lookup(material_hash, orig_mat); + mface->mat_nr = GET_INT_FROM_POINTER(BLI_ghash_lookup(material_hash, orig_mat)); } else mface->mat_nr = 0; diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 15080041721..dad5b12f421 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -4161,13 +4161,13 @@ static void editing_panel_armature_type(Object *ob, bArmature *arm) for(a=0; a<8; a++) { short dx= 18; but= uiDefButBitS(block, BUT_TOGDUAL, 1<<a, REDRAWVIEW3D, "", 10+a*dx, 115, dx, 15, &arm->layer, 0, 0, 0, 0, "Armature layer (Hold Ctrl for locking in a proxy instance)"); - uiButSetFunc(but, armature_layer_cb, &arm->layer, (void *)(1<<a)); + uiButSetFunc(but, armature_layer_cb, &arm->layer, SET_INT_IN_POINTER(1<<a)); } uiBlockBeginAlign(block); for(a=8; a<16; a++) { short dx= 18; but= uiDefButBitS(block, BUT_TOGDUAL, 1<<a, REDRAWVIEW3D, "", 18+a*dx, 115, dx, 15, &arm->layer, 0, 0, 0, 0, "Armature layer (Hold Ctrl for locking in a proxy instance)"); - uiButSetFunc(but, armature_layer_cb, &arm->layer, (void *)(1<<a)); + uiButSetFunc(but, armature_layer_cb, &arm->layer, SET_INT_IN_POINTER(1<<a)); } /* quite bad here, but I don't know a better place for copy... */ if(ob->pose) @@ -4367,13 +4367,13 @@ static void editing_panel_armature_bones(Object *ob, bArmature *arm) for(a=0; a<8; a++) { short dx= 21; but= uiDefButBitS(block, TOG, 1<<a, REDRAWVIEW3D, "", -10+a*dx, by-57, dx, 15, &curBone->layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<<a)); + uiButSetFunc(but, armature_layer_cb, &curBone->layer, SET_INT_IN_POINTER(1<<a)); } uiBlockBeginAlign(block); for(a=8; a<16; a++) { short dx= 21; but= uiDefButBitS(block, TOG, 1<<a, REDRAWVIEW3D, "", -6+a*dx, by-57, dx, 15, &curBone->layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<<a)); + uiButSetFunc(but, armature_layer_cb, &curBone->layer, SET_INT_IN_POINTER(1<<a)); } uiBlockEndAlign(block); @@ -4470,13 +4470,13 @@ static void editing_panel_pose_bones(Object *ob, bArmature *arm) for(a=0; a<8; a++) { short dx= 21; but= uiDefButBitS(block, TOG, 1<<a, REDRAWVIEW3D, "", -10+a*dx, by-57, dx, 15, &curBone->layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<<a)); + uiButSetFunc(but, armature_layer_cb, &curBone->layer, SET_INT_IN_POINTER(1<<a)); } uiBlockBeginAlign(block); for(a=8; a<16; a++) { short dx= 21; but= uiDefButBitS(block, TOG, 1<<a, REDRAWVIEW3D, "", -6+a*dx, by-57, dx, 15, &curBone->layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<<a)); + uiButSetFunc(but, armature_layer_cb, &curBone->layer, SET_INT_IN_POINTER(1<<a)); } uiBlockEndAlign(block); @@ -4994,7 +4994,7 @@ static void editing_panel_mesh_skgen(Object *ob, Mesh *me) int y = 90 - 20 * i; but = uiDefIconBut(block, BUT, B_MODIFIER_RECALC, VICON_MOVE_DOWN, 1025, y, 16, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Change the order the subdivisions algorithm are applied"); - uiButSetFunc(but, skgen_reorder, (void *)i, NULL); + uiButSetFunc(but, skgen_reorder, SET_INT_IN_POINTER(i), NULL); switch(G.scene->toolsettings->skgen_subdivisions[i]) { diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 10209984e9f..27caedf0cdd 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -64,6 +64,8 @@ #include "BKE_main.h" #include "BKE_sca.h" #include "BKE_property.h" +#include "BKE_property.h" +#include "BKE_utildefines.h" #include "BIF_gl.h" #include "BIF_resources.h" @@ -215,7 +217,7 @@ void make_unique_prop_names(char *str) static void make_unique_prop_names_cb(void *strv, void *redraw_view3d_flagv) { char *str= strv; - int redraw_view3d_flag= (int) redraw_view3d_flagv; + int redraw_view3d_flag= GET_INT_FROM_POINTER(redraw_view3d_flagv); make_unique_prop_names(str); if (redraw_view3d_flag) allqueue(REDRAWVIEW3D, 0); diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 1649a53e474..a955f7a89e4 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -2711,7 +2711,7 @@ static void render_panel_yafrayGlobal() static void layer_copy_func(void *lay_v, void *lay_p) { unsigned int *lay= lay_p; - int laybit= (int)lay_v; + int laybit= GET_INT_FROM_POINTER(lay_v); if(G.qual & (LR_SHIFTKEY|LR_CTRLKEY)) { if(*lay==0) *lay= 1<<laybit; diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index a0b3bf123ce..89e34b6d73e 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -897,7 +897,7 @@ void draw_uvs_sima(void) glLineWidth(1); col2[0] = col2[1] = col2[2] = 128; col2[3] = 255; - glColor4ubv(col2); + glColor4ubv((unsigned char *)col2); if (G.f & G_DRAWEDGES) { glShadeModel(GL_SMOOTH); diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index b9d3a7b1b11..c1665332be8 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -908,7 +908,7 @@ static void seam_add_adjacent(Mesh *me, Heap *heap, int mednum, int vertnum, int if (cost[adjnum] > newcost) { cost[adjnum] = newcost; prevedge[adjnum] = mednum; - BLI_heap_insert(heap, newcost, (void*)adjnum); + BLI_heap_insert(heap, newcost, SET_INT_IN_POINTER(adjnum)); } } } @@ -973,11 +973,11 @@ static int seam_shortest_path(Mesh *me, int source, int target) /* regular dijkstra shortest path, but over edges instead of vertices */ heap = BLI_heap_new(); - BLI_heap_insert(heap, 0.0f, (void*)source); + BLI_heap_insert(heap, 0.0f, SET_INT_IN_POINTER(source)); cost[source] = 0.0f; while (!BLI_heap_empty(heap)) { - mednum = (int)BLI_heap_popmin(heap); + mednum = GET_INT_FROM_POINTER(BLI_heap_popmin(heap)); med = me->medge + mednum; if (mednum == target) |