提交 1eff4350 编写于 作者: B Behdad Esfahbod

Minor optimization

上级 675956ac
...@@ -197,16 +197,17 @@ static inline void ...@@ -197,16 +197,17 @@ static inline void
decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest) decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest)
{ {
hb_buffer_t * const buffer = c->buffer; hb_buffer_t * const buffer = c->buffer;
hb_codepoint_t u = buffer->cur().codepoint;
hb_codepoint_t glyph; hb_codepoint_t glyph;
/* Kind of a cute waterfall here... */ /* Kind of a cute waterfall here... */
if (shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph)) if (shortest && c->font->get_glyph (u, 0, &glyph))
next_char (buffer, glyph); next_char (buffer, glyph);
else if (decompose (c, shortest, buffer->cur().codepoint)) else if (decompose (c, shortest, u))
skip_char (buffer); skip_char (buffer);
else if (!shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph)) else if (!shortest && c->font->get_glyph (u, 0, &glyph))
next_char (buffer, glyph); next_char (buffer, glyph);
else if (decompose_compatibility (c, buffer->cur().codepoint)) else if (decompose_compatibility (c, u))
skip_char (buffer); skip_char (buffer);
else else
next_char (buffer, glyph); /* glyph is initialized in earlier branches. */ next_char (buffer, glyph); /* glyph is initialized in earlier branches. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册