diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-30 17:49:32 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-30 17:49:32 +0400 |
commit | 83ec6dd1bd574ad0102c4a9b8ec9a59294ff2c24 (patch) | |
tree | 39255065f94e74dfa3cd41633bebc3ac67ce09b9 /source/blender/bmesh/intern/bmesh_operators.c | |
parent | 55c210b57ed803d8f6fd16132e44c9c272703af1 (diff) |
Fix out-of-date slot type sizes.
The BMO_OPSLOT_TYPEINFO array was out of date, the last two entries
were off by one. Updated with correct values and added comments to
make it easier to match up in future.
Also changed the alloc string for mapping slot's ghash to something
more descriptive than "bemsh op".
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_operators.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index d658b9a5bf2..3c348b91f78 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -64,16 +64,17 @@ static const char *bmo_error_messages[] = { /* operator slot type information - size of one element of the type given. */ const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES] = { - 0, - sizeof(int), - sizeof(int), - sizeof(float), - sizeof(void *), - 0, /* unused */ - 0, /* unused */ - 0, /* unused */ - sizeof(void *), /* pointer buffer */ - sizeof(BMOElemMapping) + 0, /* 0: BMO_OP_SLOT_SENTINEL */ + sizeof(int), /* 1: BMO_OP_SLOT_BOOL */ + sizeof(int), /* 2: BMO_OP_SLOT_INT */ + sizeof(float), /* 3: BMO_OP_SLOT_FLT */ + sizeof(void *), /* 4: BMO_OP_SLOT_PNT */ + sizeof(void *), /* 5: BMO_OP_SLOT_PNT */ + 0, /* 6: unused */ + 0, /* 7: unused */ + sizeof(float) * 3, /* 8: BMO_OP_SLOT_VEC */ + sizeof(void *), /* 9: BMO_OP_SLOT_ELEMENT_BUF */ + sizeof(BMOElemMapping) /* 10: BMO_OP_SLOT_MAPPING */ }; /* Dummy slot so there is something to return when slot name lookup fails */ @@ -546,7 +547,7 @@ void BMO_slot_map_insert(BMesh *UNUSED(bm), BMOperator *op, const char *slotname if (!slot->data.ghash) { slot->data.ghash = BLI_ghash_new(BLI_ghashutil_ptrhash, - BLI_ghashutil_ptrcmp, "bmesh op"); + BLI_ghashutil_ptrcmp, "bmesh slot map hash"); } BLI_ghash_insert(slot->data.ghash, element, mapping); |