fix build by untemplatizing DictOpSet & DictVal

as they aren't instantiated with BlendArg (yet)
pull/1113/head
Michiharu Ariza 6 years ago
parent f2d299b0b7
commit 5ea03d2951
  1. 21
      src/hb-cff-interp-dict-common.hh
  2. 1
      src/hb-cff2-interp-cs.hh
  3. 8
      src/hb-ot-cff1-table.hh
  4. 16
      src/hb-ot-cff2-table.hh
  5. 4
      src/hb-subset-cff-common.hh

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

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

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

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

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

Loading…
Cancel
Save