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

View File

@@ -2515,10 +2515,10 @@ double ui_but_value_get(uiBut *but)
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
if (RNA_property_array_check(prop)) {
value = RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex);
value = double(RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex));
}
else {
value = RNA_property_boolean_get(&but->rnapoin, prop);
value = double(RNA_property_boolean_get(&but->rnapoin, prop));
}
break;
case PROP_INT: