Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-20 17:29:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-20 17:29:27 +0400
commitebaf1306b8167ea28be61980305a53b3c54cc4dc (patch)
treec4bcb52ec0fbc33d72e88bffd8df63f65155c377 /source/blender/bmesh/intern/bmesh_operators.c
parent1dd5a89c87563d077f016fc38894c5195f6f03b0 (diff)
bmesh operator api:
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_operators.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c
index 740f8eb6059..2566d6bfa24 100644
--- a/source/blender/bmesh/intern/bmesh_operators.c
+++ b/source/blender/bmesh/intern/bmesh_operators.c
@@ -592,13 +592,12 @@ int BMO_slot_map_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_na
/* inserts a key/value mapping into a mapping slot. note that it copies the
* value, it doesn't store a reference to it. */
-void BMO_slot_map_insert(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name,
- void *element, void *data, int len)
+void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot,
+ const void *element, void *data, int len)
{
BMOElemMapping *mapping;
- BMOpSlot *slot = BMO_slot_get(slot_args, slot_name);
BLI_assert(slot->slot_type == BMO_OP_SLOT_MAPPING);
- BLI_assert(op->slots_in == slot_args || op->slots_out == slot_args);
+ BMO_ASSERT_SLOT_IN_OP(slot, op);
mapping = (BMOElemMapping *) BLI_memarena_alloc(op->arena, sizeof(*mapping) + len);
@@ -610,7 +609,7 @@ void BMO_slot_map_insert(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], c
slot->data.ghash = BLI_ghash_ptr_new("bmesh slot map hash");
}
- BLI_ghash_insert(slot->data.ghash, element, mapping);
+ BLI_ghash_insert(slot->data.ghash, (void *)element, mapping);
}
#if 0