[OTLayout] Reuse apply context for recursion
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 00a4bd4..0b1bc68 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -233,10 +233,10 @@
if (unlikely (nesting_level_left == 0 || !recurse_func))
return default_return_value ();
- /* TODO Reuse context. */
- hb_apply_context_t new_c (*this);
- new_c.nesting_level_left--;
- return recurse_func (&new_c, lookup_index);
+ nesting_level_left--;
+ recurse_func (this, lookup_index);
+ nesting_level_left++;
+ return default_return_value ();
}
hb_font_t *font;