diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2019-11-25 15:05:53 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2019-11-25 15:09:09 +0900 |
commit | 09e76e982801a838688ea80be29844ed91c23f46 (patch) | |
tree | 123e2e669a8eee829445c8c67bc57abff8dd7248 /complex.c | |
parent | e27acb61485189fd7647741b6ca19920989dec03 (diff) |
Improve consistency of bool/true/false
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -235,19 +235,19 @@ f_negate(VALUE x) return rb_funcall(x, id_negate, 0); } -static VALUE nucomp_real_p(VALUE self); +static bool nucomp_real_p(VALUE self); static inline bool f_real_p(VALUE x) { if (RB_INTEGER_TYPE_P(x)) { - return TRUE; + return true; } else if (RB_FLOAT_TYPE_P(x)) { - return TRUE; + return true; } else if (RB_TYPE_P(x, T_RATIONAL)) { - return TRUE; + return true; } else if (RB_TYPE_P(x, T_COMPLEX)) { return nucomp_real_p(x); @@ -1096,11 +1096,11 @@ nucomp_eqeq_p(VALUE self, VALUE other) return f_boolcast(f_eqeq_p(other, self)); } -static VALUE +static bool nucomp_real_p(VALUE self) { get_dat1(self); - return(f_zero_p(dat->imag) ? Qtrue : Qfalse); + return(f_zero_p(dat->imag) ? true : false); } /* |