summaryrefslogtreecommitdiff
path: root/src/hb-aat-layout-bsln-table.hh
diff options
context:
space:
mode:
authorEbrahim Byagowi <ebrahim@gnu.org>2018-04-18 12:09:37 +0430
committerGitHub <noreply@github.com>2018-04-18 12:09:37 +0430
commita47070cd40cee51fe792cb838ff9f21e0ea482c6 (patch)
tree3ba38a1a00305d4538a4c18ec52bd9b8d82e6e1f /src/hb-aat-layout-bsln-table.hh
parent1a309dcd72f9f54672a7341788a9b2241c922793 (diff)
downloadharfbuzz-a47070cd40cee51fe792cb838ff9f21e0ea482c6.tar.gz
Minor, annotate the added tables with likely/unlikely (#997)
Diffstat (limited to 'src/hb-aat-layout-bsln-table.hh')
-rw-r--r--src/hb-aat-layout-bsln-table.hh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/hb-aat-layout-bsln-table.hh b/src/hb-aat-layout-bsln-table.hh
index a35b4483..df2bf5b4 100644
--- a/src/hb-aat-layout-bsln-table.hh
+++ b/src/hb-aat-layout-bsln-table.hh
@@ -42,7 +42,7 @@ struct BaselineTableFormat0Part
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (c->check_struct (this));
+ return_trace (likely (c->check_struct (this)));
}
protected:
@@ -60,7 +60,8 @@ struct BaselineTableFormat1Part
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (c->check_struct (this) && lookupTable.sanitize (c));
+ return_trace (likely (c->check_struct (this) &&
+ lookupTable.sanitize (c)));
}
protected:
@@ -77,7 +78,7 @@ struct BaselineTableFormat2Part
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (c->check_struct (this));
+ return_trace (likely (c->check_struct (this)));
}
protected:
@@ -120,7 +121,7 @@ struct bsln
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- if (!(c->check_struct (this) && defaultBaseline < 32))
+ if (unlikely (!(c->check_struct (this) && defaultBaseline < 32)))
return_trace (false);
switch (format) {