mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Refactor fix_to_f in numeric.c
This commit is contained in:
+1
-5
@@ -1073,11 +1073,7 @@ fix_rshift(mrb_state *mrb, mrb_value x)
|
||||
static mrb_value
|
||||
fix_to_f(mrb_state *mrb, mrb_value num)
|
||||
{
|
||||
mrb_float val;
|
||||
|
||||
val = (mrb_float)mrb_fixnum(num);
|
||||
|
||||
return mrb_float_value(mrb, val);
|
||||
return mrb_float_value(mrb, (mrb_float)mrb_fixnum(num));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user