Fix: forgot to commit these files as part of strand bugfix.

This commit is contained in:
2012-05-04 12:46:51 +00:00
parent a0ce240de9
commit 68d9e73ecd
3 changed files with 7 additions and 7 deletions

View File

@@ -149,10 +149,10 @@ int BLI_ghashutil_intcmp (const void *a, const void *b);
typedef struct GHashPair {
const void *first;
int second;
const void *second;
} GHashPair;
GHashPair* BLI_ghashutil_pairalloc (const void *first, int second);
GHashPair* BLI_ghashutil_pairalloc (const void *first, const void *second);
unsigned int BLI_ghashutil_pairhash (const void *ptr);
int BLI_ghashutil_paircmp (const void *a, const void *b);
void BLI_ghashutil_pairfree (void *ptr);

View File

@@ -305,7 +305,7 @@ int BLI_ghashutil_strcmp(const void *a, const void *b)
return strcmp(a, b);
}
GHashPair *BLI_ghashutil_pairalloc(const void *first, int second)
GHashPair *BLI_ghashutil_pairalloc(const void *first, const void *second)
{
GHashPair *pair = MEM_mallocN(sizeof(GHashPair), "GHashPair");
pair->first = first;
@@ -317,7 +317,7 @@ unsigned int BLI_ghashutil_pairhash(const void *ptr)
{
const GHashPair *pair = ptr;
unsigned int hash = BLI_ghashutil_ptrhash(pair->first);
return hash ^ BLI_ghashutil_inthash(SET_INT_IN_POINTER(pair->second));
return hash ^ BLI_ghashutil_ptrhash(pair->second);
}
int BLI_ghashutil_paircmp(const void *a, const void *b)
@@ -327,7 +327,7 @@ int BLI_ghashutil_paircmp(const void *a, const void *b)
int cmp = BLI_ghashutil_ptrcmp(A->first, B->first);
if (cmp == 0)
return BLI_ghashutil_intcmp(SET_INT_IN_POINTER(A->second), SET_INT_IN_POINTER(B->second));
return BLI_ghashutil_ptrcmp(A->second, B->second);
return cmp;
}

View File

@@ -1102,7 +1102,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
if (dupli_gh)
BLI_ghash_insert(dupli_gh, dob, ob);
if (parent_gh)
BLI_ghash_insert(parent_gh, BLI_ghashutil_pairalloc(dob->ob, dob->index), ob);
BLI_ghash_insert(parent_gh, BLI_ghashutil_pairalloc(dob->ob, SET_INT_IN_POINTER(dob->index)), ob);
}
if (use_hierarchy) {
@@ -1116,7 +1116,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
/* find parent that was also made real */
if (ob_src_par) {
GHashPair *pair = BLI_ghashutil_pairalloc(ob_src_par, dob->index);
GHashPair *pair = BLI_ghashutil_pairalloc(ob_src_par, SET_INT_IN_POINTER(dob->index));
ob_dst_par = BLI_ghash_lookup(parent_gh, pair);
BLI_ghashutil_pairfree(pair);
}