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<layer, 0, 0, 0, 0, "Armature layer (Hold Ctrl for locking in a proxy instance)"); - uiButSetFunc(but, armature_layer_cb, &arm->layer, (void *)(1<layer, SET_INT_IN_POINTER(1<layer, 0, 0, 0, 0, "Armature layer (Hold Ctrl for locking in a proxy instance)"); - uiButSetFunc(but, armature_layer_cb, &arm->layer, (void *)(1<layer, SET_INT_IN_POINTER(1<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<layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<layer, SET_INT_IN_POINTER(1<layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<layer, SET_INT_IN_POINTER(1<layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<layer, SET_INT_IN_POINTER(1<layer, 0, 0, 0, 0, "Armature layer that bone exists on"); - uiButSetFunc(but, armature_layer_cb, &curBone->layer, (void *)(1<layer, SET_INT_IN_POINTER(1<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< 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)