[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Dec 18 06:14:56 UTC 2016
src/hb-ot-font.cc | 6 +++++-
src/hb-ot-layout-gpos-table.hh | 14 +++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
New commits:
commit ad273881c597a95929ce3b84f63865f9d7dcdb7e
Author: Volker H. Simonis <volker.simonis at gmail.com>
Date: Wed Dec 14 18:56:17 2016 +0100
Minor fixes to pacify Coverity code scan
Fixes https://github.com/behdad/harfbuzz/pull/377
diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc
index df01bc9..5be055d 100644
--- a/src/hb-ot-font.cc
+++ b/src/hb-ot-font.cc
@@ -355,7 +355,11 @@ struct hb_ot_face_cmap_accelerator_t
if (!subtable) subtable = cmap->find_subtable (0, 2);
if (!subtable) subtable = cmap->find_subtable (0, 1);
if (!subtable) subtable = cmap->find_subtable (0, 0);
- if (!subtable)(subtable = cmap->find_subtable (3, 0)) && (symbol = true);
+ if (!subtable)
+ {
+ subtable = cmap->find_subtable (3, 0);
+ if (subtable) symbol = true;
+ }
/* Meh. */
if (!subtable) subtable = &OT::Null(OT::CmapSubtable);
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 5c9fc29..952fd60 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -690,7 +690,7 @@ struct PairPosFormat1
(this+coverage).add_coverage (c->input);
unsigned int count = pairSet.len;
for (unsigned int i = 0; i < count; i++)
- (this+pairSet[i]).collect_glyphs (c, &valueFormat1);
+ (this+pairSet[i]).collect_glyphs (c, valueFormat);
}
inline const Coverage &get_coverage (void) const
@@ -709,7 +709,7 @@ struct PairPosFormat1
skippy_iter.reset (buffer->idx, 1);
if (!skippy_iter.next ()) return_trace (false);
- return_trace ((this+pairSet[index]).apply (c, &valueFormat1, skippy_iter.idx));
+ return_trace ((this+pairSet[index]).apply (c, valueFormat, skippy_iter.idx));
}
inline bool sanitize (hb_sanitize_context_t *c) const
@@ -718,11 +718,11 @@ struct PairPosFormat1
if (!c->check_struct (this)) return_trace (false);
- unsigned int len1 = valueFormat1.get_len ();
- unsigned int len2 = valueFormat2.get_len ();
+ unsigned int len1 = valueFormat[0].get_len ();
+ unsigned int len2 = valueFormat[1].get_len ();
PairSet::sanitize_closure_t closure = {
this,
- &valueFormat1,
+ valueFormat,
len1,
1 + len1 + len2
};
@@ -735,10 +735,10 @@ struct PairPosFormat1
OffsetTo<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of subtable */
- ValueFormat valueFormat1; /* Defines the types of data in
+ ValueFormat valueFormat[2]; /* [0] Defines the types of data in
* ValueRecord1--for the first glyph
* in the pair--may be zero (0) */
- ValueFormat valueFormat2; /* Defines the types of data in
+ /* [1] Defines the types of data in
* ValueRecord2--for the second glyph
* in the pair--may be zero (0) */
OffsetArrayOf<PairSet>
More information about the HarfBuzz
mailing list