[Bf-blender-cvs] [88a9d82bbbb] master: Cleanup: Remove weird assert in button handling
Julian Eisel
noreply at git.blender.org
Mon Sep 21 13:15:57 CEST 2020
Commit: 88a9d82bbbbd4b1a67160a06de03535593e9bac8
Author: Julian Eisel
Date: Mon Sep 21 13:08:19 2020 +0200
Branches: master
https://developer.blender.org/rB88a9d82bbbbd4b1a67160a06de03535593e9bac8
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?).
===================================================================
M source/blender/editors/interface/interface.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 5e17354f3f7..2cb58c92449 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3342,9 +3342,6 @@ void ui_but_range_set_soft(uiBut *but)
but->softmax = max_ff(but->softmax, value);
}
}
- else {
- BLI_assert(0);
- }
}
/* ******************* Free ********************/
More information about the Bf-blender-cvs
mailing list