summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-06-20 21:59:30 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-06-20 21:59:30 +0000
commita56980dacb8f7bf5f60ec2a532801d64b2b26062 (patch)
tree36982aecfc17a0290b9f52fbe827b73495ceb81f /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
parent7cc8f5e6b341952e8ee7b0576956aaba313f1bd5 (diff)
harfbuzz-2.5.2
git-svn-id: svn://tug.org/texlive/trunk@51414 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh72
1 files changed, 36 insertions, 36 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
index 03604a0adf9..98bdfa32469 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
@@ -59,14 +59,14 @@ enum
struct AxisValueFormat1
{
+ hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this)));
}
- hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
-
protected:
HBUINT16 format; /* Format identifier — set to 1. */
HBUINT16 axisIndex; /* Zero-base index into the axis record array
@@ -84,14 +84,14 @@ struct AxisValueFormat1
struct AxisValueFormat2
{
+ hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this)));
}
- hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
-
protected:
HBUINT16 format; /* Format identifier — set to 2. */
HBUINT16 axisIndex; /* Zero-base index into the axis record array
@@ -113,14 +113,14 @@ struct AxisValueFormat2
struct AxisValueFormat3
{
+ hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this)));
}
- hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
-
protected:
HBUINT16 format; /* Format identifier — set to 3. */
HBUINT16 axisIndex; /* Zero-base index into the axis record array
@@ -157,14 +157,14 @@ struct AxisValueRecord
struct AxisValueFormat4
{
+ hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this)));
}
- hb_ot_name_id_t get_value_name_id () const { return valueNameID; }
-
protected:
HBUINT16 format; /* Format identifier — set to 4. */
HBUINT16 axisCount; /* The total number of axes contributing to
@@ -183,31 +183,31 @@ struct AxisValueFormat4
struct AxisValue
{
- bool sanitize (hb_sanitize_context_t *c) const
+ hb_ot_name_id_t get_value_name_id () const
{
- TRACE_SANITIZE (this);
- if (unlikely (!c->check_struct (this)))
- return_trace (false);
-
switch (u.format)
{
- case 1: return_trace (likely (u.format1.sanitize (c)));
- case 2: return_trace (likely (u.format2.sanitize (c)));
- case 3: return_trace (likely (u.format3.sanitize (c)));
- case 4: return_trace (likely (u.format4.sanitize (c)));
- default: return_trace (true);
+ case 1: return u.format1.get_value_name_id ();
+ case 2: return u.format2.get_value_name_id ();
+ case 3: return u.format3.get_value_name_id ();
+ case 4: return u.format4.get_value_name_id ();
+ default:return HB_OT_NAME_ID_INVALID;
}
}
- hb_ot_name_id_t get_value_name_id () const
+ bool sanitize (hb_sanitize_context_t *c) const
{
+ TRACE_SANITIZE (this);
+ if (unlikely (!c->check_struct (this)))
+ return_trace (false);
+
switch (u.format)
{
- case 1: return u.format1.get_value_name_id ();
- case 2: return u.format2.get_value_name_id ();
- case 3: return u.format3.get_value_name_id ();
- case 4: return u.format4.get_value_name_id ();
- default: return HB_OT_NAME_ID_INVALID;
+ case 1: return_trace (u.format1.sanitize (c));
+ case 2: return_trace (u.format2.sanitize (c));
+ case 3: return_trace (u.format3.sanitize (c));
+ case 4: return_trace (u.format4.sanitize (c));
+ default:return_trace (true);
}
}
@@ -226,14 +226,14 @@ struct AxisValue
struct StatAxisRecord
{
+ hb_ot_name_id_t get_name_id () const { return nameID; }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this)));
}
- hb_ot_name_id_t get_name_id () const { return nameID; }
-
protected:
Tag tag; /* A tag identifying the axis of design variation. */
NameID nameID; /* The name ID for entries in the 'name' table that
@@ -249,16 +249,6 @@ struct STAT
{
static constexpr hb_tag_t tableTag = HB_OT_TAG_STAT;
- bool sanitize (hb_sanitize_context_t *c) const
- {
- TRACE_SANITIZE (this);
- return_trace (likely (c->check_struct (this) &&
- version.major == 1 &&
- version.minor > 0 &&
- designAxesOffset.sanitize (c, this, designAxisCount) &&
- offsetToAxisValueOffsets.sanitize (c, this, axisValueCount, &(this+offsetToAxisValueOffsets))));
- }
-
bool has_data () const { return version.to_int (); }
unsigned get_design_axis_count () const { return designAxisCount; }
@@ -295,6 +285,16 @@ struct STAT
;
}
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (likely (c->check_struct (this) &&
+ version.major == 1 &&
+ version.minor > 0 &&
+ designAxesOffset.sanitize (c, this, designAxisCount) &&
+ offsetToAxisValueOffsets.sanitize (c, this, axisValueCount, &(this+offsetToAxisValueOffsets))));
+ }
+
protected:
hb_array_t<const StatAxisRecord> const get_design_axes () const
{ return (this+designAxesOffset).as_array (designAxisCount); }