Cleanup: use explicit casts when assigning booleans to floats

While valid, this isn't so common and cppcheck warns about this,
use explicit casts to suppress the warning, also correct "true"
being assigned to a float value.
This commit is contained in:
Campbell Barton
2024-04-01 22:16:23 +11:00
parent fc266730a2
commit d514b3b53b
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -633,7 +633,7 @@ float BPY_driver_exec(PathResolvedRNA *anim_rna,
dvar->curval = float(PyLong_AsLong(driver_arg));
}
else if (PyBool_Check(driver_arg)) {
dvar->curval = (driver_arg == Py_True);
dvar->curval = float(driver_arg == Py_True);
}
else {
dvar->curval = 0.0f;