numeric.c: adjust indent [ci skip]

* numeric.c (rb_num2ulong_internal): adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-11-01 12:35:31 +00:00
Родитель 5dc2472024
Коммит 22e41718a4
1 изменённых файлов: 11 добавлений и 12 удалений

Просмотреть файл

@ -2666,18 +2666,17 @@ rb_num2ulong_internal(VALUE val, int *wrap_p)
return (unsigned long)l; return (unsigned long)l;
} }
else if (RB_TYPE_P(val, T_FLOAT)) { else if (RB_TYPE_P(val, T_FLOAT)) {
if (RFLOAT_VALUE(val) < ULONG_MAX_PLUS_ONE double d = RFLOAT_VALUE(val);
&& LONG_MIN_MINUS_ONE_IS_LESS_THAN(RFLOAT_VALUE(val))) { if (d < ULONG_MAX_PLUS_ONE && LONG_MIN_MINUS_ONE_IS_LESS_THAN(d)) {
double d = RFLOAT_VALUE(val); if (wrap_p)
if (wrap_p) *wrap_p = d <= -1.0; /* NUM2ULONG(v) uses v.to_int conceptually. */
*wrap_p = d <= -1.0; /* NUM2ULONG(v) uses v.to_int conceptually. */ if (0 <= d)
if (0 <= d) return (unsigned long)d;
return (unsigned long)d; return (unsigned long)(long)d;
return (unsigned long)(long)d; }
} else {
else { FLOAT_OUT_OF_RANGE(val, "integer");
FLOAT_OUT_OF_RANGE(val, "integer"); }
}
} }
else if (RB_TYPE_P(val, T_BIGNUM)) { else if (RB_TYPE_P(val, T_BIGNUM)) {
{ {