mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 18:13:53 +01:00
[cff] Fix unlikely invocations
This commit is contained in:
1 parent
9ef241cd40
commit
0ca7ad4352
2 files changed
+5
-5
No files matched your search
@@ -132,7 +132,7 @@ struct CFFIndex
|
||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||
this->count = byteArray.length;
|
||||
this->offSize = offSize_;
|
||||
if (!unlikely (c->allocate_size<HBUINT8> (offSize_ * (byteArray.length + 1))))
|
||||
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (byteArray.length + 1))))
|
||||
return_trace (false);
|
||||
|
||||
/* serialize indices */
|
||||
@@ -277,7 +277,7 @@ struct CFFIndexOf : CFFIndex<COUNT>
|
||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||
this->count = dataArrayLen;
|
||||
this->offSize = offSize_;
|
||||
if (!unlikely (c->allocate_size<HBUINT8> (offSize_ * (dataArrayLen + 1))))
|
||||
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (dataArrayLen + 1))))
|
||||
return_trace (false);
|
||||
|
||||
/* serialize indices */
|
||||
@@ -479,7 +479,7 @@ struct FDArray : CFFIndexOf<COUNT, FontDict>
|
||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||
this->count = fontDicts.length;
|
||||
this->offSize = offSize_;
|
||||
if (!unlikely (c->allocate_size<HBUINT8> (offSize_ * (fontDicts.length + 1))))
|
||||
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (fontDicts.length + 1))))
|
||||
return_trace (false);
|
||||
|
||||
/* serialize font dict offsets */
|
||||
@@ -516,7 +516,7 @@ struct FDArray : CFFIndexOf<COUNT, FontDict>
|
||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||
this->count = fdCount;
|
||||
this->offSize = offSize_;
|
||||
if (!unlikely (c->allocate_size<HBUINT8> (offSize_ * (fdCount + 1))))
|
||||
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (fdCount + 1))))
|
||||
return_trace (false);
|
||||
|
||||
/* serialize font dict offsets */
|
||||
|
||||
@@ -576,7 +576,7 @@ struct CFF1StringIndex : CFF1Index
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely ((strings.count == 0) || (sidmap.get_count () == 0)))
|
||||
{
|
||||
if (!unlikely (c->extend_min (this->count)))
|
||||
if (unlikely (!c->extend_min (this->count)))
|
||||
return_trace (false);
|
||||
count = 0;
|
||||
return_trace (true);
|
||||
|
||||
Reference in new issue
Block a user