Cleanup: Remove weird assert in button handling
The function this was in already checks the conditions under which it can operate (as it should). No need to force the caller to do these (quite specific) checks, the function can just do nothing if the button doesn't need these operations. Otherwise we'd have to always execute these checks before calling, which makes calling it a hassle, makes the code harder to follow and generally harder to maintain (what if the conditions change?).
This commit is contained in:
parent
92454ae100
commit
88a9d82bbb
@ -3342,9 +3342,6 @@ void ui_but_range_set_soft(uiBut *but)
|
||||
but->softmax = max_ff(but->softmax, value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BLI_assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ******************* Free ********************/
|
||||
|
Loading…
Reference in New Issue
Block a user