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:
-rw-r--r--source/blender/editors/screen/screen_context.c3
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_expand.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 11a62123ad7..fe69759481b 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -1024,9 +1024,8 @@ static eContextResult screen_ctx_sel_actions_impl(const bContext *C,
}
/* Add the action to the output list if not already added. */
- if (!BLI_gset_haskey(seen_set, action)) {
+ if (BLI_gset_add(seen_set, action)) {
CTX_data_id_list_add(result, &action->id);
- BLI_gset_add(seen_set, action);
}
}
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index fbf988d63e8..9648f558049 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -1864,10 +1864,8 @@ static int sculpt_expand_modal(bContext *C, wmOperator *op, const wmEvent *event
/* Add new Face Sets IDs to the snapping gset if enabled. */
if (expand_cache->snap) {
const int active_face_set_id = sculpt_expand_active_face_set_id_get(ss, expand_cache);
- if (!BLI_gset_haskey(expand_cache->snap_enabled_face_sets,
- POINTER_FROM_INT(active_face_set_id))) {
- BLI_gset_add(expand_cache->snap_enabled_face_sets, POINTER_FROM_INT(active_face_set_id));
- }
+ /* The key may exist, in that case this does nothing. */
+ BLI_gset_add(expand_cache->snap_enabled_face_sets, POINTER_FROM_INT(active_face_set_id));
}
/* Update the sculpt data with the current state of the #ExpandCache. */