mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 05:51:05 +01:00
[sanitize] Speed up ChainRule::sanitize()
10% speedup in sanitizing Gulzar-Regular.
This commit is contained in:
1 parent
2006d3211f
commit
385896ff66
1 file changed
+3
-3
@@ -3087,11 +3087,11 @@ struct ChainRule
|
||||
bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
if (!backtrack.sanitize (c)) return_trace (false);
|
||||
if (!backtrack.len.sanitize (c)) return_trace (false);
|
||||
const auto &input = StructAfter<decltype (inputX)> (backtrack);
|
||||
if (!input.sanitize (c)) return_trace (false);
|
||||
if (!input.lenP1.sanitize (c)) return_trace (false);
|
||||
const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
|
||||
if (!lookahead.sanitize (c)) return_trace (false);
|
||||
if (!lookahead.len.sanitize (c)) return_trace (false);
|
||||
const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
|
||||
return_trace (lookup.sanitize (c));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user