[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46273] trunk/blender/source/blender: Fix: forgot to commit these files as part of strand bugfix.
Brecht Van Lommel
brechtvanlommel at pandora.be
Fri May 4 14:46:52 CEST 2012
Revision: 46273
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46273
Author: blendix
Date: 2012-05-04 12:46:51 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Fix: forgot to commit these files as part of strand bugfix.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/BLI_ghash.h
trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
trunk/blender/source/blender/editors/object/object_add.c
Modified: trunk/blender/source/blender/blenlib/BLI_ghash.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_ghash.h 2012-05-04 12:06:11 UTC (rev 46272)
+++ trunk/blender/source/blender/blenlib/BLI_ghash.h 2012-05-04 12:46:51 UTC (rev 46273)
@@ -149,10 +149,10 @@
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);
Modified: trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2012-05-04 12:06:11 UTC (rev 46272)
+++ trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2012-05-04 12:46:51 UTC (rev 46273)
@@ -305,7 +305,7 @@
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 @@
{
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 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;
}
Modified: trunk/blender/source/blender/editors/object/object_add.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_add.c 2012-05-04 12:06:11 UTC (rev 46272)
+++ trunk/blender/source/blender/editors/object/object_add.c 2012-05-04 12:46:51 UTC (rev 46273)
@@ -1102,7 +1102,7 @@
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 @@
/* 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);
}
More information about the Bf-blender-cvs
mailing list