Cleanup: remove redundant has key checks
This commit is contained in:
parent
1cf05f17eb
commit
e1c0d18598
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user