Fix alignment-requirement missmatch
Detected by clang and lots of cmdline options.
This commit is contained in:
parent
6095de1635
commit
2a3d911fe0
|
@ -112,7 +112,7 @@ struct _hb_buffer_t {
|
|||
HB_INTERNAL void clear_positions (void);
|
||||
HB_INTERNAL void replace_glyphs_be16 (unsigned int num_in,
|
||||
unsigned int num_out,
|
||||
const uint16_t *glyph_data_be);
|
||||
const char *glyph_data_be);
|
||||
HB_INTERNAL void replace_glyphs (unsigned int num_in,
|
||||
unsigned int num_out,
|
||||
const hb_codepoint_t *glyph_data);
|
||||
|
|
|
@ -233,7 +233,7 @@ hb_buffer_t::swap_buffers (void)
|
|||
void
|
||||
hb_buffer_t::replace_glyphs_be16 (unsigned int num_in,
|
||||
unsigned int num_out,
|
||||
const uint16_t *glyph_data_be)
|
||||
const char *glyph_data_be)
|
||||
{
|
||||
if (!make_room_for (num_in, num_out)) return;
|
||||
|
||||
|
@ -245,10 +245,11 @@ hb_buffer_t::replace_glyphs_be16 (unsigned int num_in,
|
|||
}
|
||||
|
||||
hb_glyph_info_t *pinfo = &out_info[out_len];
|
||||
const unsigned char *data = (const unsigned char *) glyph_data_be;
|
||||
for (unsigned int i = 0; i < num_out; i++)
|
||||
{
|
||||
*pinfo = orig_info;
|
||||
pinfo->codepoint = hb_be_uint16 (glyph_data_be[i]);
|
||||
pinfo->codepoint = (data[2*i] << 8) | data[2*i+1];
|
||||
pinfo++;
|
||||
}
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ struct Sequence
|
|||
if (unlikely (!substitute.len)) return TRACE_RETURN (false);
|
||||
|
||||
unsigned int klass = c->property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE ? HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH : 0;
|
||||
c->replace_glyphs_be16 (1, substitute.len, (const uint16_t *) substitute.array, klass);
|
||||
c->replace_glyphs_be16 (1, substitute.len, (const char *) substitute.array, klass);
|
||||
|
||||
return TRACE_RETURN (true);
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ struct Ligature
|
|||
|
||||
if (skippy_iter.idx < c->buffer->idx + count) /* No input glyphs skipped */
|
||||
{
|
||||
c->replace_glyphs_be16 (count, 1, (const uint16_t *) &ligGlyph, klass);
|
||||
c->replace_glyphs_be16 (count, 1, (const char *) &ligGlyph, klass);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -230,7 +230,7 @@ struct hb_apply_context_t
|
|||
}
|
||||
inline void replace_glyphs_be16 (unsigned int num_in,
|
||||
unsigned int num_out,
|
||||
const uint16_t *glyph_data_be,
|
||||
const char *glyph_data_be,
|
||||
unsigned int klass = 0) const
|
||||
{
|
||||
buffer->cur().props_cache() = klass; /* XXX if has gdef? */
|
||||
|
|
Loading…
Reference in New Issue