[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57151] trunk/blender/source/blender: correct cast to uintptr_t for smallhash use.
Campbell Barton
ideasman42 at gmail.com
Fri May 31 02:19:39 CEST 2013
Revision: 57151
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57151
Author: campbellbarton
Date: 2013-05-31 00:19:38 +0000 (Fri, 31 May 2013)
Log Message:
-----------
correct cast to uintptr_t for smallhash use.
Modified Paths:
--------------
trunk/blender/source/blender/bmesh/operators/bmo_edgenet.c
trunk/blender/source/blender/editors/mesh/editmesh_knife.c
Modified: trunk/blender/source/blender/bmesh/operators/bmo_edgenet.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_edgenet.c 2013-05-30 21:39:12 UTC (rev 57150)
+++ trunk/blender/source/blender/bmesh/operators/bmo_edgenet.c 2013-05-31 00:19:38 UTC (rev 57151)
@@ -254,8 +254,8 @@
continue;
do {
- if (BLI_smallhash_haskey(hash, (intptr_t)e2) ||
- BLI_smallhash_haskey(hash, (intptr_t)v))
+ if (BLI_smallhash_haskey(hash, (uintptr_t)e2) ||
+ BLI_smallhash_haskey(hash, (uintptr_t)v))
{
ok = 0;
break;
@@ -264,7 +264,7 @@
BLI_array_append(verts, v);
BLI_array_append(edges, e2);
- BLI_smallhash_insert(hash, (intptr_t)e2, NULL);
+ BLI_smallhash_insert(hash, (uintptr_t)e2, NULL);
v = BM_edge_other_vert(e2, v);
e2 = i ? rotsys_prevedge(e2, v, edata, vdata) : rotsys_nextedge(e2, v, edata, vdata);
Modified: trunk/blender/source/blender/editors/mesh/editmesh_knife.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_knife.c 2013-05-30 21:39:12 UTC (rev 57150)
+++ trunk/blender/source/blender/editors/mesh/editmesh_knife.c 2013-05-31 00:19:38 UTC (rev 57151)
@@ -1212,7 +1212,7 @@
for (ref = lst->first; ref; ref = ref->next) {
KnifeEdge *kfe = ref->ref;
- if (BLI_smallhash_haskey(ehash, (intptr_t)kfe)) {
+ if (BLI_smallhash_haskey(ehash, (uintptr_t)kfe)) {
continue; /* We already found a hit on this knife edge */
}
@@ -1271,7 +1271,7 @@
}
/* ok, if visible add the new point */
- if (!f_hit && !BLI_smallhash_haskey(ehash, (intptr_t)kfe)) {
+ if (!f_hit && !BLI_smallhash_haskey(ehash, (uintptr_t)kfe)) {
BMEdgeHit hit;
if (len_squared_v3v3(p, kcd->curr.co) < depsilon_sq ||
@@ -1315,7 +1315,7 @@
knife_project_v2(kcd, hit.cagehit, hit.schit);
BLI_array_append(edges, hit);
- BLI_smallhash_insert(ehash, (intptr_t)kfe, NULL);
+ BLI_smallhash_insert(ehash, (uintptr_t)kfe, NULL);
}
}
}
@@ -1900,13 +1900,13 @@
if (!BMO_elem_flag_test(bm, f, FACE_NEW))
continue;
- if (BLI_smallhash_haskey(visit, (intptr_t)f))
+ if (BLI_smallhash_haskey(visit, (uintptr_t)f))
continue;
BLI_array_empty(stack);
BLI_array_empty(faces);
BLI_array_append(stack, f);
- BLI_smallhash_insert(visit, (intptr_t)f, NULL);
+ BLI_smallhash_insert(visit, (uintptr_t)f, NULL);
do {
f2 = BLI_array_pop(stack);
@@ -1923,10 +1923,10 @@
BM_ITER_ELEM (f3, &fiter, e, BM_FACES_OF_EDGE) {
if (!BMO_elem_flag_test(bm, f3, FACE_NEW))
continue;
- if (BLI_smallhash_haskey(visit, (intptr_t)f3))
+ if (BLI_smallhash_haskey(visit, (uintptr_t)f3))
continue;
- BLI_smallhash_insert(visit, (intptr_t)f3, NULL);
+ BLI_smallhash_insert(visit, (uintptr_t)f3, NULL);
BLI_array_append(stack, f3);
}
}
@@ -2086,34 +2086,34 @@
BLI_scanfill_begin(&sf_ctx);
for (entry = face_nets[i].first; entry; entry = entry->next) {
- if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v1)) {
+ if (!BLI_smallhash_haskey(hash, (uintptr_t)entry->kfe->v1)) {
sf_vert = BLI_scanfill_vert_add(&sf_ctx, entry->kfe->v1->v->co);
sf_vert->poly_nr = 0;
rnd_offset_co(rng, sf_vert->co, rndscale);
sf_vert->tmp.p = entry->kfe->v1->v;
- BLI_smallhash_insert(hash, (intptr_t)entry->kfe->v1, sf_vert);
+ BLI_smallhash_insert(hash, (uintptr_t)entry->kfe->v1, sf_vert);
}
- if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v2)) {
+ if (!BLI_smallhash_haskey(hash, (uintptr_t)entry->kfe->v2)) {
sf_vert = BLI_scanfill_vert_add(&sf_ctx, entry->kfe->v2->v->co);
sf_vert->poly_nr = 0;
rnd_offset_co(rng, sf_vert->co, rndscale);
sf_vert->tmp.p = entry->kfe->v2->v;
- BLI_smallhash_insert(hash, (intptr_t)entry->kfe->v2, sf_vert);
+ BLI_smallhash_insert(hash, (uintptr_t)entry->kfe->v2, sf_vert);
}
}
for (j = 0, entry = face_nets[i].first; entry; entry = entry->next, j++) {
- sf_vert_last = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
- sf_vert = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
+ sf_vert_last = BLI_smallhash_lookup(hash, (uintptr_t)entry->kfe->v1);
+ sf_vert = BLI_smallhash_lookup(hash, (uintptr_t)entry->kfe->v2);
sf_vert->poly_nr++;
sf_vert_last->poly_nr++;
}
for (j = 0, entry = face_nets[i].first; entry; entry = entry->next, j++) {
- sf_vert_last = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
- sf_vert = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
+ sf_vert_last = BLI_smallhash_lookup(hash, (uintptr_t)entry->kfe->v1);
+ sf_vert = BLI_smallhash_lookup(hash, (uintptr_t)entry->kfe->v2);
if (sf_vert->poly_nr > 1 && sf_vert_last->poly_nr > 1) {
ScanFillEdge *sf_edge;
More information about the Bf-blender-cvs
mailing list