Cleanup: order checks to skip redundant function calls
This commit is contained in:
@@ -1633,7 +1633,9 @@ bool BKE_id_new_name_validate(
|
||||
}
|
||||
|
||||
result = BKE_main_namemap_get_name(bmain, id, name, false);
|
||||
result |= !STREQ(id->name + 2, name);
|
||||
if (!result && !STREQ(id->name + 2, name)) {
|
||||
result = true;
|
||||
}
|
||||
|
||||
BLI_strncpy(id->name + 2, name, sizeof(id->name) - 2);
|
||||
id_sort_by_name(lb, id, nullptr);
|
||||
|
||||
@@ -280,7 +280,7 @@ void drawSnapping(TransInfo *t)
|
||||
rv3d, source_loc, target_loc, t->tsnap.source_type, t->tsnap.target_type, col, activeCol);
|
||||
|
||||
/* Draw normal if needed. */
|
||||
if (usingSnappingNormal(t) && validSnappingNormal(t) && target_loc) {
|
||||
if (target_loc && usingSnappingNormal(t) && validSnappingNormal(t)) {
|
||||
uint pos = GPU_vertformat_attr_add(
|
||||
immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user