use ints for ghash/edgehash flags, since its allocated theres not much point to try save a few bytes here.
This commit is contained in:
@@ -51,8 +51,8 @@ void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned in
|
||||
bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1);
|
||||
int BLI_edgehash_size(EdgeHash *eh);
|
||||
void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp);
|
||||
void BLI_edgehash_flag_set(EdgeHash *eh, unsigned short flag);
|
||||
void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned short flag);
|
||||
void BLI_edgehash_flag_set(EdgeHash *eh, unsigned int flag);
|
||||
void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag);
|
||||
|
||||
EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh);
|
||||
void BLI_edgehashIterator_free(EdgeHashIterator *ehi);
|
||||
@@ -65,5 +65,4 @@ bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi);
|
||||
#define BLI_EDGEHASH_SIZE_GUESS_FROM_LOOPS(totloop) ((totloop) / 2)
|
||||
#define BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totpoly) ((totpoly) * 2)
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* __BLI_EDGEHASH_H__ */
|
||||
|
@@ -71,8 +71,8 @@ void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfr
|
||||
void *BLI_ghash_pop(GHash *gh, void *key, GHashKeyFreeFP keyfreefp);
|
||||
bool BLI_ghash_haskey(GHash *gh, const void *key);
|
||||
int BLI_ghash_size(GHash *gh);
|
||||
void BLI_ghash_flag_set(GHash *gh, unsigned short flag);
|
||||
void BLI_ghash_flag_clear(GHash *gh, unsigned short flag);
|
||||
void BLI_ghash_flag_set(GHash *gh, unsigned int flag);
|
||||
void BLI_ghash_flag_clear(GHash *gh, unsigned int flag);
|
||||
|
||||
/* *** */
|
||||
|
||||
|
@@ -77,7 +77,7 @@ struct GHash {
|
||||
struct BLI_mempool *entrypool;
|
||||
unsigned int nbuckets;
|
||||
unsigned int nentries;
|
||||
unsigned short cursize, flag;
|
||||
unsigned int cursize, flag;
|
||||
};
|
||||
|
||||
|
||||
@@ -343,14 +343,14 @@ void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreef
|
||||
MEM_freeN(gh);
|
||||
}
|
||||
|
||||
void BLI_ghash_flag_set(GHash *gh, unsigned short flag)
|
||||
void BLI_ghash_flag_set(GHash *gh, unsigned int flag)
|
||||
{
|
||||
gh->flag |= flag;
|
||||
}
|
||||
|
||||
void BLI_ghash_flag_clear(GHash *gh, unsigned short flag)
|
||||
void BLI_ghash_flag_clear(GHash *gh, unsigned int flag)
|
||||
{
|
||||
gh->flag &= (unsigned short)~flag;
|
||||
gh->flag &= ~flag;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -75,7 +75,7 @@ struct EdgeHash {
|
||||
EdgeEntry **buckets;
|
||||
BLI_mempool *epool;
|
||||
unsigned int nbuckets, nentries;
|
||||
unsigned short cursize, flag;
|
||||
unsigned int cursize, flag;
|
||||
};
|
||||
|
||||
|
||||
@@ -295,14 +295,14 @@ void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp)
|
||||
}
|
||||
|
||||
|
||||
void BLI_edgehash_flag_set(EdgeHash *eh, unsigned short flag)
|
||||
void BLI_edgehash_flag_set(EdgeHash *eh, unsigned int flag)
|
||||
{
|
||||
eh->flag |= flag;
|
||||
}
|
||||
|
||||
void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned short flag)
|
||||
void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag)
|
||||
{
|
||||
eh->flag &= (unsigned short)~flag;
|
||||
eh->flag &= ~flag;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -667,7 +667,7 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
|
||||
if (!(vert_idx || edge_idx || face_idx))
|
||||
return;
|
||||
|
||||
/* Remap vertices */
|
||||
/* Remap Verts */
|
||||
if (vert_idx) {
|
||||
BMVert **verts_pool, *verts_copy, **vep;
|
||||
int i, totvert = bm->totvert;
|
||||
@@ -701,7 +701,7 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
|
||||
MEM_freeN(verts_copy);
|
||||
}
|
||||
|
||||
/* XXX Code not tested yet (though I don't why it would fail)! */
|
||||
/* Remap Edges */
|
||||
if (edge_idx) {
|
||||
BMEdge **edges_pool, *edges_copy, **edp;
|
||||
int i, totedge = bm->totedge;
|
||||
@@ -734,7 +734,7 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
|
||||
MEM_freeN(edges_copy);
|
||||
}
|
||||
|
||||
/* XXX Code not tested yet (though I don't why it would fail)! */
|
||||
/* Remap Faces */
|
||||
if (face_idx) {
|
||||
BMFace **faces_pool, *faces_copy, **fap;
|
||||
int i, totface = bm->totface;
|
||||
|
Reference in New Issue
Block a user