more double changes
authorMichiharu Ariza <ariza@adobe.com>
Mon, 3 Dec 2018 23:32:42 +0000 (15:32 -0800)
committerMichiharu Ariza <ariza@adobe.com>
Mon, 3 Dec 2018 23:32:42 +0000 (15:32 -0800)
src/hb-cff-interp-common.hh
src/hb-cff-interp-dict-common.hh

index 2ec056f..396bc8c 100644 (file)
@@ -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<ARG, 513>
     n.set_fixed (v);
   }
 
-  inline void push_real (float v)
+  inline void push_real (double v)
   {
     ARG &n = S::push ();
     n.set_real (v);
index aff3562..2822af4 100644 (file)
@@ -103,9 +103,9 @@ struct DictOpSet : OpSet<Number>
     }
   }
 
-  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<Number>
        if (!substr.avail ())
        {
          substr.set_error ();
-         return 0.0f;
+         return 0.0;
        }
        byte = substr[0];
        substr.inc ();
@@ -152,13 +152,13 @@ struct DictOpSet : OpSet<Number>
            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;