fixing compile errors with VisualStudio 2008.

* macro ABS has no effect with uintptr_t anyway and was throwing warning (promoted to error) -> commented out and marked with TODO
* removed two unused variables trhowing warning also promoted to error when compiling.
This commit is contained in:
Andrea Weikert
2011-07-03 17:07:07 +00:00
parent d88ea6ab91
commit 25ffeed8bf
3 changed files with 8 additions and 7 deletions

View File

@@ -1334,7 +1334,7 @@ static void bmDM_copyPolyArray(DerivedMesh *dm, MPoly *poly_r)
{
EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
BMesh *bm = ((EditDerivedBMesh *)dm)->tc->bm;
BMIter iter, liter;
BMIter iter;
BMFace *f;
int i, j;

View File

@@ -2621,7 +2621,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
float *w = NULL;
WeightTable wtable = {0};
MCol *mcol;
MEdge *medge = NULL, medge2;
MEdge *medge = NULL;
MFace *mface = NULL;
MPoly *mpoly = NULL;

View File

@@ -100,7 +100,7 @@ BM_INLINE void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item)
{
int h, hoff=1;
key = ABS(key);
/* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */
if (hash->size < hash->used*3) {
int newsize = hashsizes[++hash->curhash];
@@ -156,7 +156,7 @@ BM_INLINE void BLI_smallhash_remove(SmallHash *hash, uintptr_t key)
{
int h, hoff=1;
key = ABS(key);
/* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */
h = key;
while (hash->table[h % hash->size].key != key
@@ -176,7 +176,7 @@ BM_INLINE void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key)
{
int h, hoff=1;
key = ABS(key);
/* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */
h = key;
if (!hash->table)
@@ -196,8 +196,9 @@ BM_INLINE void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key)
BM_INLINE int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key)
{
int h = ABS(key), hoff=1;
key = ABS(key);
int h = key, hoff=1;
h = ABS(h);
/* key = ABS(key); TODO: XXXXX this throws error with MSVC (warning as error) */
if (!hash->table)
return 0;