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>2013-08-17 12:00:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-17 12:00:22 +0400
commit85b0315b3bae9e699021977f9b40d504d9a9d108 (patch)
tree0777800d7d8cf2d3569493c2e4b937480fe1910b /source/blender/editors/uvedit
parent1b11428101d390e482f6a67adba27f42cda7f4a8 (diff)
avoid double ghash lookups
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 3318ae72624..f788c6a772c 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1718,6 +1718,7 @@ static int stitch_init(bContext *C, wmOperator *op)
UvElement *element = ED_uv_element_get(state->element_map, efa, l);
int offset1, itmp1 = element - state->element_map->buf;
int offset2, itmp2 = ED_uv_element_get(state->element_map, efa, l->next) - state->element_map->buf;
+ UvEdge *edge;
offset1 = map[itmp1];
offset2 = map[itmp2];
@@ -1737,8 +1738,8 @@ static int stitch_init(bContext *C, wmOperator *op)
all_edges[counter].uv2 = offset1;
}
- if (BLI_ghash_haskey(edge_hash, &all_edges[counter])) {
- UvEdge *edge = BLI_ghash_lookup(edge_hash, &all_edges[counter]);
+ edge = BLI_ghash_lookup(edge_hash, &all_edges[counter]);
+ if (edge) {
edge->flag = 0;
}
else {