Cleanup: replace C-style casts with functional casts for numeric types
This commit is contained in:
@@ -495,7 +495,7 @@ static bool add_collection_search_item(CollItemSearch *cis,
|
||||
cis->name,
|
||||
cis->data,
|
||||
cis->iconid,
|
||||
cis->has_sep_char ? (int)UI_BUT_HAS_SEP_CHAR : 0,
|
||||
cis->has_sep_char ? int(UI_BUT_HAS_SEP_CHAR) : 0,
|
||||
name_prefix_offset);
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ int UI_calc_float_precision(int prec, double value)
|
||||
*/
|
||||
value = fabs(value);
|
||||
if ((value < pow10_neg[prec]) && (value > (1.0 / max_pow))) {
|
||||
int value_i = (int)lround(value * max_pow);
|
||||
int value_i = int(lround(value * max_pow));
|
||||
if (value_i != 0) {
|
||||
const int prec_span = 3; /* show: 0.01001, 5 would allow 0.0100001 for eg. */
|
||||
int test_prec;
|
||||
|
||||
Reference in New Issue
Block a user