[cff] Fix unlikely invocations
This commit is contained in:
parent
9ef241cd40
commit
0ca7ad4352
|
@ -132,7 +132,7 @@ struct CFFIndex
|
||||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||||
this->count = byteArray.length;
|
this->count = byteArray.length;
|
||||||
this->offSize = offSize_;
|
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);
|
return_trace (false);
|
||||||
|
|
||||||
/* serialize indices */
|
/* serialize indices */
|
||||||
|
@ -277,7 +277,7 @@ struct CFFIndexOf : CFFIndex<COUNT>
|
||||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||||
this->count = dataArrayLen;
|
this->count = dataArrayLen;
|
||||||
this->offSize = offSize_;
|
this->offSize = offSize_;
|
||||||
if (!unlikely (c->allocate_size<HBUINT8> (offSize_ * (dataArrayLen + 1))))
|
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (dataArrayLen + 1))))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
|
|
||||||
/* serialize indices */
|
/* serialize indices */
|
||||||
|
@ -479,7 +479,7 @@ struct FDArray : CFFIndexOf<COUNT, FontDict>
|
||||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||||
this->count = fontDicts.length;
|
this->count = fontDicts.length;
|
||||||
this->offSize = offSize_;
|
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);
|
return_trace (false);
|
||||||
|
|
||||||
/* serialize font dict offsets */
|
/* serialize font dict offsets */
|
||||||
|
@ -516,7 +516,7 @@ struct FDArray : CFFIndexOf<COUNT, FontDict>
|
||||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||||
this->count = fdCount;
|
this->count = fdCount;
|
||||||
this->offSize = offSize_;
|
this->offSize = offSize_;
|
||||||
if (!unlikely (c->allocate_size<HBUINT8> (offSize_ * (fdCount + 1))))
|
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (fdCount + 1))))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
|
|
||||||
/* serialize font dict offsets */
|
/* serialize font dict offsets */
|
||||||
|
|
|
@ -576,7 +576,7 @@ struct CFF1StringIndex : CFF1Index
|
||||||
TRACE_SERIALIZE (this);
|
TRACE_SERIALIZE (this);
|
||||||
if (unlikely ((strings.count == 0) || (sidmap.get_count () == 0)))
|
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);
|
return_trace (false);
|
||||||
count = 0;
|
count = 0;
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
|
|
Loading…
Reference in New Issue