[subset] De-templatize hb_subset_context_t
We're going to (finally) use virtual methods for hb_serialize_context_t customization, so don't need to carry a Serializer template variable around... Simplifies code.
This commit is contained in:
parent
22acd424ca
commit
e58b190292
|
@ -473,7 +473,7 @@ struct hb_serialize_context_t
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
inline Type *start_embed (void)
|
inline Type *start_embed (void) const
|
||||||
{
|
{
|
||||||
Type *ret = reinterpret_cast<Type *> (this->head);
|
Type *ret = reinterpret_cast<Type *> (this->head);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -1308,11 +1308,10 @@ struct GSUB : GSUBGPOS
|
||||||
inline const SubstLookup& get_lookup (unsigned int i) const
|
inline const SubstLookup& get_lookup (unsigned int i) const
|
||||||
{ return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
|
{ return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
|
||||||
|
|
||||||
template <typename Serializer>
|
inline bool subset (hb_subset_context_t *c)
|
||||||
inline bool subset (hb_subset_context_t<Serializer> *c)
|
|
||||||
{
|
{
|
||||||
TRACE_SUBSET (this);
|
TRACE_SUBSET (this);
|
||||||
//struct GSUB *out = c->serializer->start_embed<GSUB> ();
|
struct GSUB *out = c->serializer->start_embed<GSUB> ();
|
||||||
//XXX if (unlikely (!GSUBGPOS::subset (c))) return_trace (false);
|
//XXX if (unlikely (!GSUBGPOS::subset (c))) return_trace (false);
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,8 @@
|
||||||
#include "hb-subset-input.hh"
|
#include "hb-subset-input.hh"
|
||||||
#include "hb-subset-plan.hh"
|
#include "hb-subset-plan.hh"
|
||||||
|
|
||||||
template <typename Serializer>
|
|
||||||
struct hb_subset_context_t :
|
struct hb_subset_context_t :
|
||||||
hb_dispatch_context_t<hb_subset_context_t<Serializer>, bool, HB_DEBUG_SUBSET>
|
hb_dispatch_context_t<hb_subset_context_t, bool, HB_DEBUG_SUBSET>
|
||||||
{
|
{
|
||||||
inline const char *get_name (void) { return "SUBSET"; }
|
inline const char *get_name (void) { return "SUBSET"; }
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -47,11 +46,11 @@ struct hb_subset_context_t :
|
||||||
bool stop_sublookup_iteration (bool r) const { return false; }
|
bool stop_sublookup_iteration (bool r) const { return false; }
|
||||||
|
|
||||||
hb_subset_plan_t *plan;
|
hb_subset_plan_t *plan;
|
||||||
Serializer *serializer;
|
hb_serialize_context_t *serializer;
|
||||||
unsigned int debug_depth;
|
unsigned int debug_depth;
|
||||||
|
|
||||||
hb_subset_context_t (hb_subset_plan_t *plan_,
|
hb_subset_context_t (hb_subset_plan_t *plan_,
|
||||||
Serializer *serializer_) :
|
hb_serialize_context_t *serializer_) :
|
||||||
plan (plan_),
|
plan (plan_),
|
||||||
serializer (serializer_),
|
serializer (serializer_),
|
||||||
debug_depth (0) {}
|
debug_depth (0) {}
|
||||||
|
|
Loading…
Reference in New Issue