[open-type] Add static_assert for NO_VARIATION
This commit is contained in:
parent
d4496e6405
commit
bf2ae3f0ca
|
@ -212,6 +212,7 @@ typedef Index NameID;
|
|||
|
||||
struct VarIdx : HBUINT32 {
|
||||
static constexpr unsigned NO_VARIATION = 0xFFFFFFFFu;
|
||||
static_assert (NO_VARIATION == HB_OT_LAYOUT_NO_VARIATIONS_INDEX, "");
|
||||
VarIdx& operator = (uint32_t i) { HBUINT32::operator= (i); return *this; }
|
||||
};
|
||||
DECLARE_NULL_NAMESPACE_BYTES (OT, VarIdx);
|
||||
|
|
|
@ -940,7 +940,7 @@ struct ClipBox
|
|||
int ymin = u.format1.yMin;
|
||||
int xmax = u.format1.xMax;
|
||||
int ymax = u.format1.yMax;
|
||||
if (u.format == 2 && instancer && u.format2.varIdxBase != HB_OT_LAYOUT_NO_VARIATIONS_INDEX)
|
||||
if (u.format == 2 && instancer && u.format2.varIdxBase != VarIdx::NO_VARIATION)
|
||||
{
|
||||
uint32_t varIdx = u.format2.varIdxBase;
|
||||
xmin += _hb_roundf (instancer (varIdx+0));
|
||||
|
|
Loading…
Reference in New Issue