From 93328cedfc6e55e78f86db1026f4f1b98dd84501 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 3 Dec 2022 12:49:26 -0700 Subject: [PATCH] [Device] Save a map get() --- src/hb-ot-layout-common.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index a02abdadf..b1b47ded3 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -3459,13 +3459,13 @@ struct VariationDevice auto *out = c->embed (this); if (unlikely (!out)) return_trace (nullptr); - /* TODO Just get() and bail if NO_VARIATION. Needs to setup the map to return that. */ - if (!layout_variation_idx_delta_map->has (varIdx)) + hb_pair_t *v; + if (!layout_variation_idx_delta_map->has (varIdx, &v)) { c->revert (snap); return_trace (nullptr); } - unsigned new_idx = hb_first (layout_variation_idx_delta_map->get (varIdx)); + unsigned new_idx = hb_first (*v); out->varIdx = new_idx; return_trace (out); }