From: Michiharu Ariza Date: Mon, 3 Dec 2018 23:32:42 +0000 (-0800) Subject: more double changes X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e5180cd444b6900a0fa0c3df4c8138f9a663383;p=platform%2Fupstream%2FlibHarfBuzzSharp.git more double changes --- diff --git a/src/hb-cff-interp-common.hh b/src/hb-cff-interp-common.hh index 2ec056f..396bc8c 100644 --- a/src/hb-cff-interp-common.hh +++ b/src/hb-cff-interp-common.hh @@ -229,10 +229,10 @@ struct Number { return (int32_t)(value * 65536.0); } - inline void set_real (float v) { value = (double)v; } - inline float to_real (void) const + inline void set_real (double v) { value = (double)v; } + inline double to_real (void) const { - return (float)value; + return value; } inline int ceil (void) const @@ -520,7 +520,7 @@ struct ArgStack : Stack n.set_fixed (v); } - inline void push_real (float v) + inline void push_real (double v) { ARG &n = S::push (); n.set_real (v); diff --git a/src/hb-cff-interp-dict-common.hh b/src/hb-cff-interp-dict-common.hh index aff3562..2822af4 100644 --- a/src/hb-cff-interp-dict-common.hh +++ b/src/hb-cff-interp-dict-common.hh @@ -103,9 +103,9 @@ struct DictOpSet : OpSet } } - static inline float parse_bcd (SubByteStr& substr) + static inline double parse_bcd (SubByteStr& substr) { - float v = 0.0f; + double v = 0.0; bool neg = false; double int_part = 0; @@ -126,7 +126,7 @@ struct DictOpSet : OpSet if (!substr.avail ()) { substr.set_error (); - return 0.0f; + return 0.0; } byte = substr[0]; substr.inc (); @@ -152,13 +152,13 @@ struct DictOpSet : OpSet else value *= pow (10.0, (double)exp_part); } - return (float)value; + return value; case NEG: if (i != 0) { substr.set_error (); - return 0.0f; + return 0.0; } neg = true; break;