fix build by untemplatizing DictOpSet & DictVal

as they aren't instantiated with BlendArg (yet)
This commit is contained in:
Michiharu Ariza 2018-09-04 11:29:15 -07:00
parent f2d299b0b7
commit 5ea03d2951
5 changed files with 23 additions and 27 deletions

View File

@ -33,7 +33,6 @@ namespace CFF {
using namespace OT;
/* an opstr and the parsed out dict value(s) */
template <typename ARG=Number>
struct DictVal : OpStr
{
inline void init (void)
@ -47,11 +46,11 @@ struct DictVal : OpStr
multi_val.fini ();
}
ARG single_val;
hb_vector_t<ARG> multi_val;
Number single_val;
hb_vector_t<Number> multi_val;
};
typedef DictVal<> NumDictVal;
typedef DictVal NumDictVal;
template <typename VAL>
struct DictValues
@ -118,10 +117,9 @@ struct TopDictValues : DictValues<OpStr>
unsigned int FDArrayOffset;
};
template <typename ARG=Number>
struct DictOpSet : OpSet<ARG>
struct DictOpSet : OpSet<Number>
{
static inline bool process_op (OpCode op, InterpEnv<ARG>& env)
static inline bool process_op (OpCode op, InterpEnv<Number>& env)
{
switch (op) {
case OpCode_longintdict: /* 5-byte integer */
@ -134,7 +132,7 @@ struct DictOpSet : OpSet<ARG>
return true;
default:
return OpSet<ARG>::process_op (op, env);
return OpSet<Number>::process_op (op, env);
}
return true;
@ -165,10 +163,9 @@ struct DictOpSet : OpSet<ARG>
}
};
template <typename ARG=Number>
struct TopDictOpSet : DictOpSet<ARG>
struct TopDictOpSet : DictOpSet
{
static inline bool process_op (OpCode op, InterpEnv<ARG>& env, TopDictValues& dictval)
static inline bool process_op (OpCode op, InterpEnv<Number>& env, TopDictValues& dictval)
{
switch (op) {
case OpCode_CharStrings:
@ -182,7 +179,7 @@ struct TopDictOpSet : DictOpSet<ARG>
env.clear_args ();
break;
default:
return DictOpSet<ARG>::process_op (op, env);
return DictOpSet::process_op (op, env);
}
return true;

View File

@ -77,7 +77,6 @@ struct BlendArg : Number
};
typedef InterpEnv<BlendArg> BlendInterpEnv;
typedef DictVal<BlendArg> BlendDictVal;
struct CFF2CSInterpEnv : CSInterpEnv<BlendArg, CFF2Subrs>
{

View File

@ -407,7 +407,7 @@ struct CFF1TopDictValues : TopDictValues
TableInfo privateDictInfo;
};
struct CFF1TopDictOpSet : TopDictOpSet<>
struct CFF1TopDictOpSet : TopDictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF1TopDictValues& dictval)
{
@ -509,7 +509,7 @@ struct CFF1FontDictValues : DictValues<OpStr>
TableInfo privateDictInfo;
};
struct CFF1FontDictOpSet : DictOpSet<>
struct CFF1FontDictOpSet : DictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF1FontDictValues& dictval)
{
@ -572,7 +572,7 @@ struct CFF1PrivateDictValues_Base : DictValues<VAL>
typedef CFF1PrivateDictValues_Base<OpStr> CFF1PrivateDictValues_Subset;
typedef CFF1PrivateDictValues_Base<NumDictVal> CFF1PrivateDictValues;
struct CFF1PrivateDictOpSet : DictOpSet<>
struct CFF1PrivateDictOpSet : DictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF1PrivateDictValues& dictval)
{
@ -622,7 +622,7 @@ struct CFF1PrivateDictOpSet : DictOpSet<>
}
};
struct CFF1PrivateDictOpSet_Subset : DictOpSet<>
struct CFF1PrivateDictOpSet_Subset : DictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF1PrivateDictValues_Subset& dictval)
{

View File

@ -173,14 +173,14 @@ struct CFF2TopDictValues : TopDictValues
unsigned int FDSelectOffset;
};
struct CFF2TopDictOpSet : TopDictOpSet<>
struct CFF2TopDictOpSet : TopDictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF2TopDictValues& dictval)
{
switch (op) {
case OpCode_FontMatrix:
{
DictVal<> val;
DictVal val;
val.init ();
dictval.pushVal (op, env.substr);
env.clear_args ();
@ -209,7 +209,7 @@ struct CFF2TopDictOpSet : TopDictOpSet<>
return true;
}
typedef TopDictOpSet<> SUPER;
typedef TopDictOpSet SUPER;
};
struct CFF2FontDictValues : DictValues<OpStr>
@ -228,7 +228,7 @@ struct CFF2FontDictValues : DictValues<OpStr>
TableInfo privateDictInfo;
};
struct CFF2FontDictOpSet : DictOpSet<>
struct CFF2FontDictOpSet : DictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF2FontDictValues& dictval)
{
@ -253,7 +253,7 @@ struct CFF2FontDictOpSet : DictOpSet<>
}
private:
typedef DictOpSet<> SUPER;
typedef DictOpSet SUPER;
};
template <typename VAL>
@ -291,7 +291,7 @@ struct CFF2PrivateDictValues_Base : DictValues<VAL>
typedef CFF2PrivateDictValues_Base<OpStr> CFF2PrivateDictValues_Subset;
typedef CFF2PrivateDictValues_Base<NumDictVal> CFF2PrivateDictValues;
struct CFF2PrivateDictOpSet : DictOpSet<>
struct CFF2PrivateDictOpSet : DictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF2PrivateDictValues& dictval)
{
@ -344,7 +344,7 @@ struct CFF2PrivateDictOpSet : DictOpSet<>
}
};
struct CFF2PrivateDictOpSet_Subset : DictOpSet<Number>
struct CFF2PrivateDictOpSet_Subset : DictOpSet
{
static inline bool process_op (OpCode op, NumInterpEnv& env, CFF2PrivateDictValues_Subset& dictval)
{
@ -387,7 +387,7 @@ struct CFF2PrivateDictOpSet_Subset : DictOpSet<Number>
}
private:
typedef DictOpSet<Number> SUPER;
typedef DictOpSet SUPER;
};
typedef DictInterpreter<CFF2TopDictOpSet, CFF2TopDictValues> CFF2TopDict_Interpreter;

View File

@ -223,7 +223,7 @@ struct CFFPrivateDict_OpSerializer : OpSerializer
{
TRACE_SERIALIZE (this);
if (drop_hints && DictOpSet<>::is_hint_op (opstr.op))
if (drop_hints && DictOpSet::is_hint_op (opstr.op))
return true;
if (opstr.op == OpCode_Subrs)
{
@ -238,7 +238,7 @@ struct CFFPrivateDict_OpSerializer : OpSerializer
inline unsigned int calculate_serialized_size (const OpStr &opstr) const
{
if (drop_hints && DictOpSet<>::is_hint_op (opstr.op))
if (drop_hints && DictOpSet::is_hint_op (opstr.op))
return 0;
if (opstr.op == OpCode_Subrs)
{