Revert "Imported Upstream version 1.2.7"
[platform/upstream/harfbuzz.git] / src / hb-open-file-private.hh
index 5357ddc..178bc7c 100644 (file)
@@ -56,7 +56,7 @@ typedef struct TableRecord
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
     TRACE_SANITIZE (this);
-    return_trace (c->check_struct (this));
+    return TRACE_RETURN (c->check_struct (this));
   }
 
   Tag          tag;            /* 4-byte identifier. */
@@ -106,7 +106,7 @@ typedef struct OffsetTable
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
     TRACE_SANITIZE (this);
-    return_trace (c->check_struct (this) && c->check_array (tables, TableRecord::static_size, numTables));
+    return TRACE_RETURN (c->check_struct (this) && c->check_array (tables, TableRecord::static_size, numTables));
   }
 
   protected:
@@ -135,12 +135,12 @@ struct TTCHeaderVersion1
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
     TRACE_SANITIZE (this);
-    return_trace (table.sanitize (c, this));
+    return TRACE_RETURN (table.sanitize (c, this));
   }
 
   protected:
   Tag          ttcTag;         /* TrueType Collection ID string: 'ttcf' */
-  FixedVersion<>version;       /* Version of the TTC Header (1.0),
+  FixedVersion version;        /* Version of the TTC Header (1.0),
                                 * 0x00010000u */
   ArrayOf<OffsetTo<OffsetTable, ULONG>, ULONG>
                table;          /* Array of offsets to the OffsetTable for each font
@@ -175,11 +175,11 @@ struct TTCHeader
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
     TRACE_SANITIZE (this);
-    if (unlikely (!u.header.version.sanitize (c))) return_trace (false);
+    if (unlikely (!u.header.version.sanitize (c))) return TRACE_RETURN (false);
     switch (u.header.version.major) {
     case 2: /* version 2 is compatible with version 1 */
-    case 1: return_trace (u.version1.sanitize (c));
-    default:return_trace (true);
+    case 1: return TRACE_RETURN (u.version1.sanitize (c));
+    default:return TRACE_RETURN (true);
     }
   }
 
@@ -187,7 +187,7 @@ struct TTCHeader
   union {
   struct {
   Tag          ttcTag;         /* TrueType Collection ID string: 'ttcf' */
-  FixedVersion<>version;       /* Version of the TTC Header (1.0 or 2.0),
+  FixedVersion version;        /* Version of the TTC Header (1.0 or 2.0),
                                 * 0x00010000u or 0x00020000u */
   }                    header;
   TTCHeaderVersion1    version1;
@@ -240,14 +240,14 @@ struct OpenTypeFontFile
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
     TRACE_SANITIZE (this);
-    if (unlikely (!u.tag.sanitize (c))) return_trace (false);
+    if (unlikely (!u.tag.sanitize (c))) return TRACE_RETURN (false);
     switch (u.tag) {
     case CFFTag:       /* All the non-collection tags */
     case TrueTag:
     case Typ1Tag:
-    case TrueTypeTag:  return_trace (u.fontFace.sanitize (c));
-    case TTCTag:       return_trace (u.ttcHeader.sanitize (c));
-    default:           return_trace (true);
+    case TrueTypeTag:  return TRACE_RETURN (u.fontFace.sanitize (c));
+    case TTCTag:       return TRACE_RETURN (u.ttcHeader.sanitize (c));
+    default:           return TRACE_RETURN (true);
     }
   }