From 1d4a328472f094c0d75a062f6e176c6b1875cfdc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 Feb 2015 11:33:30 +0300 Subject: [PATCH] [layout] Remove unneeded return value from apply() --- src/hb-ot-layout.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 1c248b614..8fc447665 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -830,16 +830,15 @@ struct GPOSProxy template -static inline bool +static inline void apply_string (OT::hb_apply_context_t *c, const typename Proxy::Lookup &lookup, const hb_ot_layout_lookup_accelerator_t &accel) { - bool ret = false; hb_buffer_t *buffer = c->buffer; if (unlikely (!buffer->len || !c->lookup_mask)) - return false; + return; c->set_lookup (lookup); @@ -850,6 +849,7 @@ apply_string (OT::hb_apply_context_t *c, buffer->clear_output (); buffer->idx = 0; + bool ret = false; while (buffer->idx < buffer->len) { if (accel.may_have (buffer->cur().codepoint) && @@ -865,7 +865,7 @@ apply_string (OT::hb_apply_context_t *c, if (!Proxy::inplace) buffer->swap_buffers (); else - assert (!buffer->has_separate_output ()); + assert (!buffer->has_separate_output ()); } } else @@ -880,15 +880,13 @@ apply_string (OT::hb_apply_context_t *c, (buffer->cur().mask & c->lookup_mask) && c->check_glyph_property (&c->buffer->cur(), c->lookup_props) && lookup.apply (c)) - ret = true; + /* nothing */; /* The reverse lookup doesn't "advance" cursor (for good reason). */ buffer->idx--; } while ((int) buffer->idx >= 0); } - - return ret; } template