removed unused field OpStr::update
This commit is contained in:
parent
3bda54c43b
commit
19ce0b24c0
|
@ -359,7 +359,6 @@ struct OpStr
|
||||||
{
|
{
|
||||||
OpCode op;
|
OpCode op;
|
||||||
ByteStr str;
|
ByteStr str;
|
||||||
bool update;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef hb_vector_t <OpStr> OpStrs;
|
typedef hb_vector_t <OpStr> OpStrs;
|
||||||
|
@ -378,12 +377,11 @@ struct DictValues
|
||||||
opStrs.fini ();
|
opStrs.fini ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void pushOpStr (OpCode op, const ByteStr& str, unsigned int offset, bool update)
|
void pushOpStr (OpCode op, const ByteStr& str, unsigned int offset)
|
||||||
{
|
{
|
||||||
OpStr *opstr = opStrs.push ();
|
OpStr *opstr = opStrs.push ();
|
||||||
opstr->op = op;
|
opstr->op = op;
|
||||||
opstr->str = ByteStr (str, opStart, offset - opStart);
|
opstr->str = ByteStr (str, opStart, offset - opStart);
|
||||||
opstr->update = update;
|
|
||||||
opStart = offset;
|
opStart = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,29 +111,29 @@ struct CFF2TopDictOpSet
|
||||||
case OpCode_CharStrings:
|
case OpCode_CharStrings:
|
||||||
if (unlikely (!check_pop_offset (stack, val.charStringsOffset)))
|
if (unlikely (!check_pop_offset (stack, val.charStringsOffset)))
|
||||||
return false;
|
return false;
|
||||||
val.pushOpStr (op, str, offset + 1, true);
|
val.pushOpStr (op, str, offset + 1);
|
||||||
break;
|
break;
|
||||||
case OpCode_vstore:
|
case OpCode_vstore:
|
||||||
if (unlikely (!check_pop_offset (stack, val.vstoreOffset)))
|
if (unlikely (!check_pop_offset (stack, val.vstoreOffset)))
|
||||||
return false;
|
return false;
|
||||||
val.pushOpStr (op, str, offset + 1, true);
|
val.pushOpStr (op, str, offset + 1);
|
||||||
break;
|
break;
|
||||||
case OpCode_FDArray:
|
case OpCode_FDArray:
|
||||||
if (unlikely (!check_pop_offset (stack, val.FDArrayOffset)))
|
if (unlikely (!check_pop_offset (stack, val.FDArrayOffset)))
|
||||||
return false;
|
return false;
|
||||||
val.pushOpStr (op, str, offset + 1, true);
|
val.pushOpStr (op, str, offset + 1);
|
||||||
break;
|
break;
|
||||||
case OpCode_FDSelect:
|
case OpCode_FDSelect:
|
||||||
if (unlikely (!check_pop_offset (stack, val.FDSelectOffset)))
|
if (unlikely (!check_pop_offset (stack, val.FDSelectOffset)))
|
||||||
return false;
|
return false;
|
||||||
val.pushOpStr (op, str, offset + 1, true);
|
val.pushOpStr (op, str, offset + 1);
|
||||||
break;
|
break;
|
||||||
case OpCode_FontMatrix:
|
case OpCode_FontMatrix:
|
||||||
if (unlikely (!stack.check_underflow (6)))
|
if (unlikely (!stack.check_underflow (6)))
|
||||||
return false;
|
return false;
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
val.FontMatrix[i] = stack.pop ().to_real ();
|
val.FontMatrix[i] = stack.pop ().to_real ();
|
||||||
val.pushOpStr (op, str, offset + 1, false);
|
val.pushOpStr (op, str, offset + 1);
|
||||||
break;
|
break;
|
||||||
case OpCode_longint: /* 5-byte integer */
|
case OpCode_longint: /* 5-byte integer */
|
||||||
if (unlikely (!str.check_limit (offset, 5) || !stack.check_overflow (1)))
|
if (unlikely (!str.check_limit (offset, 5) || !stack.check_overflow (1)))
|
||||||
|
@ -187,7 +187,7 @@ struct CFF2FontDictOpSet
|
||||||
return false;
|
return false;
|
||||||
if (unlikely (!stack.check_pop_uint (val.privateDictSize)))
|
if (unlikely (!stack.check_pop_uint (val.privateDictSize)))
|
||||||
return false;
|
return false;
|
||||||
val.pushOpStr (op, str, offset + 1, true);
|
val.pushOpStr (op, str, offset + 1);
|
||||||
break;
|
break;
|
||||||
case OpCode_longint: /* 5-byte integer */
|
case OpCode_longint: /* 5-byte integer */
|
||||||
if (unlikely (!str.check_limit (offset, 5) || !stack.check_overflow (1)))
|
if (unlikely (!str.check_limit (offset, 5) || !stack.check_overflow (1)))
|
||||||
|
@ -286,19 +286,19 @@ struct CFF2PrivateDictOpSet
|
||||||
{
|
{
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case OpCode_BlueValues:
|
case OpCode_BlueValues:
|
||||||
if (unlikely (!stack.check_pop_delta (val.blueValues, true)))
|
if (unlikely (!stack.check_pop_delta (val.blueValues)))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case OpCode_OtherBlues:
|
case OpCode_OtherBlues:
|
||||||
if (unlikely (!stack.check_pop_delta (val.otherBlues, true)))
|
if (unlikely (!stack.check_pop_delta (val.otherBlues)))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case OpCode_FamilyBlues:
|
case OpCode_FamilyBlues:
|
||||||
if (unlikely (!stack.check_pop_delta (val.familyBlues, true)))
|
if (unlikely (!stack.check_pop_delta (val.familyBlues)))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case OpCode_FamilyOtherBlues:
|
case OpCode_FamilyOtherBlues:
|
||||||
if (unlikely (!stack.check_pop_delta (val.familyOtherBlues, true)))
|
if (unlikely (!stack.check_pop_delta (val.familyOtherBlues)))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case OpCode_StdHW:
|
case OpCode_StdHW:
|
||||||
|
@ -362,7 +362,7 @@ struct CFF2PrivateDictOpSet
|
||||||
}
|
}
|
||||||
|
|
||||||
if (op != OpCode_blend)
|
if (op != OpCode_blend)
|
||||||
val.pushOpStr (op, str, offset + 1, op == OpCode_Subrs);
|
val.pushOpStr (op, str, offset + 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue