From 5ea03d2951375bfcc1258c2c0b5c33efc6ebf7f8 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Tue, 4 Sep 2018 11:29:15 -0700 Subject: [PATCH] fix build by untemplatizing DictOpSet & DictVal as they aren't instantiated with BlendArg (yet) --- src/hb-cff-interp-dict-common.hh | 21 +++++++++------------ src/hb-cff2-interp-cs.hh | 1 - src/hb-ot-cff1-table.hh | 8 ++++---- src/hb-ot-cff2-table.hh | 16 ++++++++-------- src/hb-subset-cff-common.hh | 4 ++-- 5 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/hb-cff-interp-dict-common.hh b/src/hb-cff-interp-dict-common.hh index 0f5af4e..3891857 100644 --- a/src/hb-cff-interp-dict-common.hh +++ b/src/hb-cff-interp-dict-common.hh @@ -33,7 +33,6 @@ namespace CFF { using namespace OT; /* an opstr and the parsed out dict value(s) */ -template struct DictVal : OpStr { inline void init (void) @@ -47,11 +46,11 @@ struct DictVal : OpStr multi_val.fini (); } - ARG single_val; - hb_vector_t multi_val; + Number single_val; + hb_vector_t multi_val; }; -typedef DictVal<> NumDictVal; +typedef DictVal NumDictVal; template struct DictValues @@ -118,10 +117,9 @@ struct TopDictValues : DictValues unsigned int FDArrayOffset; }; -template -struct DictOpSet : OpSet +struct DictOpSet : OpSet { - static inline bool process_op (OpCode op, InterpEnv& env) + static inline bool process_op (OpCode op, InterpEnv& env) { switch (op) { case OpCode_longintdict: /* 5-byte integer */ @@ -134,7 +132,7 @@ struct DictOpSet : OpSet return true; default: - return OpSet::process_op (op, env); + return OpSet::process_op (op, env); } return true; @@ -165,10 +163,9 @@ struct DictOpSet : OpSet } }; -template -struct TopDictOpSet : DictOpSet +struct TopDictOpSet : DictOpSet { - static inline bool process_op (OpCode op, InterpEnv& env, TopDictValues& dictval) + static inline bool process_op (OpCode op, InterpEnv& env, TopDictValues& dictval) { switch (op) { case OpCode_CharStrings: @@ -182,7 +179,7 @@ struct TopDictOpSet : DictOpSet env.clear_args (); break; default: - return DictOpSet::process_op (op, env); + return DictOpSet::process_op (op, env); } return true; diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index 02bcaa1..b5f1f8f 100644 --- a/src/hb-cff2-interp-cs.hh +++ b/src/hb-cff2-interp-cs.hh @@ -77,7 +77,6 @@ struct BlendArg : Number }; typedef InterpEnv BlendInterpEnv; -typedef DictVal BlendDictVal; struct CFF2CSInterpEnv : CSInterpEnv { diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index 56aa6ba..ebb89c1 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -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 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 typedef CFF1PrivateDictValues_Base CFF1PrivateDictValues_Subset; typedef CFF1PrivateDictValues_Base 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) { diff --git a/src/hb-ot-cff2-table.hh b/src/hb-ot-cff2-table.hh index d6874ea..9e07f30 100644 --- a/src/hb-ot-cff2-table.hh +++ b/src/hb-ot-cff2-table.hh @@ -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 @@ -228,7 +228,7 @@ struct CFF2FontDictValues : DictValues 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 @@ -291,7 +291,7 @@ struct CFF2PrivateDictValues_Base : DictValues typedef CFF2PrivateDictValues_Base CFF2PrivateDictValues_Subset; typedef CFF2PrivateDictValues_Base 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 +struct CFF2PrivateDictOpSet_Subset : DictOpSet { static inline bool process_op (OpCode op, NumInterpEnv& env, CFF2PrivateDictValues_Subset& dictval) { @@ -387,7 +387,7 @@ struct CFF2PrivateDictOpSet_Subset : DictOpSet } private: - typedef DictOpSet SUPER; + typedef DictOpSet SUPER; }; typedef DictInterpreter CFF2TopDict_Interpreter; diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index ff6d7ed..03b93a0 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -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) { -- 2.7.4