mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-time/time.c (mrb_time_minus): specify mrb_float directly
The `typedef mrb_sec` does not improve readability at all.
This commit is contained in:
@@ -650,8 +650,8 @@ mrb_time_minus(mrb_state *mrb, mrb_value self)
|
||||
if (tm2) {
|
||||
#ifndef MRB_NO_FLOAT
|
||||
mrb_float f;
|
||||
f = (mrb_sec)(tm->sec - tm2->sec)
|
||||
+ (mrb_sec)(tm->usec - tm2->usec) / 1.0e6;
|
||||
f = (mrb_float)(tm->sec - tm2->sec)
|
||||
+ (mrb_float)(tm->usec - tm2->usec) / 1.0e6;
|
||||
return mrb_float_value(mrb, f);
|
||||
#else
|
||||
mrb_int f;
|
||||
|
||||
Reference in New Issue
Block a user