Whitespace

This commit is contained in:
Behdad Esfahbod 2019-05-07 20:58:43 -07:00
parent 2b9402a86a
commit 83e3eabd84
14 changed files with 50 additions and 50 deletions

View File

@ -154,7 +154,7 @@ struct LookupSegmentArray
valuesZ.sanitize (c, base, last - first + 1)); valuesZ.sanitize (c, base, last - first + 1));
} }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, const void *base, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, const void *base, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (c->check_struct (this) &&

View File

@ -772,7 +772,7 @@ struct KerxSubTable
unsigned int get_type () const { return u.header.coverage & u.header.SubtableType; } unsigned int get_type () const { return u.header.coverage & u.header.SubtableType; }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
unsigned int subtable_type = get_type (); unsigned int subtable_type = get_type ();
TRACE_DISPATCH (this, subtable_type); TRACE_DISPATCH (this, subtable_type);

View File

@ -884,7 +884,7 @@ struct ChainSubtable
}; };
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
unsigned int subtable_type = get_type (); unsigned int subtable_type = get_type ();
TRACE_DISPATCH (this, subtable_type); TRACE_DISPATCH (this, subtable_type);

View File

@ -75,7 +75,7 @@ struct
/* Pointer-to-member-function. */ /* Pointer-to-member-function. */
template <typename Appl, typename Val1, typename ...Vals> auto template <typename Appl, typename Val1, typename ...Vals> auto
impl (Appl&& a, hb_priority<2>, Val1 &&v1, Vals &&...vs) const HB_AUTO_RETURN impl (Appl&& a, hb_priority<2>, Val1 &&v1, Vals&&... vs) const HB_AUTO_RETURN
((hb_deref (hb_forward<Val1> (v1)).*hb_forward<Appl> (a)) (hb_forward<Vals> (vs)...)) ((hb_deref (hb_forward<Val1> (v1)).*hb_forward<Appl> (a)) (hb_forward<Vals> (vs)...))
/* Pointer-to-member. */ /* Pointer-to-member. */
@ -85,13 +85,13 @@ struct
/* Operator(). */ /* Operator(). */
template <typename Appl, typename ...Vals> auto template <typename Appl, typename ...Vals> auto
impl (Appl&& a, hb_priority<0>, Vals &&...vs) const HB_AUTO_RETURN impl (Appl&& a, hb_priority<0>, Vals&&... vs) const HB_AUTO_RETURN
(hb_deref (hb_forward<Appl> (a)) (hb_forward<Vals> (vs)...)) (hb_deref (hb_forward<Appl> (a)) (hb_forward<Vals> (vs)...))
public: public:
template <typename Appl, typename ...Vals> auto template <typename Appl, typename ...Vals> auto
operator () (Appl&& a, Vals &&...vs) const HB_AUTO_RETURN operator () (Appl&& a, Vals&&... vs) const HB_AUTO_RETURN
( (
impl (hb_forward<Appl> (a), impl (hb_forward<Appl> (a),
hb_prioritize, hb_prioritize,

View File

@ -48,7 +48,7 @@ struct hb_dispatch_context_t
template <typename T, typename F> template <typename T, typename F>
bool may_dispatch (const T *obj HB_UNUSED, const F *format HB_UNUSED) { return true; } bool may_dispatch (const T *obj HB_UNUSED, const F *format HB_UNUSED) { return true; }
template <typename T, typename ...Ts> template <typename T, typename ...Ts>
return_t dispatch (const T &obj, Ts &&...ds) return_t dispatch (const T &obj, Ts&&... ds)
{ return obj.dispatch (thiz (), hb_forward<Ts> (ds)...); } { return obj.dispatch (thiz (), hb_forward<Ts> (ds)...); }
static return_t no_dispatch_return_value () { return Context::default_return_value (); } static return_t no_dispatch_return_value () { return Context::default_return_value (); }
static bool stop_sublookup_iteration (const return_t r HB_UNUSED) { return false; } static bool stop_sublookup_iteration (const return_t r HB_UNUSED) { return false; }

View File

@ -285,7 +285,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
} }
template <typename ...Ts> template <typename ...Ts>
bool serialize_subset (hb_subset_context_t *c, const Type &src, const void *base, Ts &&...ds) bool serialize_subset (hb_subset_context_t *c, const Type &src, const void *base, Ts&&... ds)
{ {
*this = 0; *this = 0;
if (has_null && &src == _hb_has_null<Type, has_null>::get_null ()) if (has_null && &src == _hb_has_null<Type, has_null>::get_null ())
@ -307,7 +307,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
/* TODO: Somehow merge this with previous function into a serialize_dispatch(). */ /* TODO: Somehow merge this with previous function into a serialize_dispatch(). */
template <typename ...Ts> template <typename ...Ts>
bool serialize_copy (hb_serialize_context_t *c, const Type &src, const void *base, Ts &&...ds) bool serialize_copy (hb_serialize_context_t *c, const Type &src, const void *base, Ts&&... ds)
{ {
*this = 0; *this = 0;
if (has_null && &src == _hb_has_null<Type, has_null>::get_null ()) if (has_null && &src == _hb_has_null<Type, has_null>::get_null ())
@ -332,7 +332,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
} }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, const void *base, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, const void *base, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (sanitize_shallow (c, base) && return_trace (sanitize_shallow (c, base) &&
@ -465,7 +465,7 @@ struct UnsizedArrayOf
return_trace (true); return_trace (true);
} }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, unsigned int count, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, unsigned int count, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c, count))) return_trace (false); if (unlikely (!sanitize_shallow (c, count))) return_trace (false);
@ -511,7 +511,7 @@ struct UnsizedOffsetListOf : UnsizedOffsetArrayOf<Type, OffsetType, has_null>
} }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, unsigned int count, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, unsigned int count, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace ((UnsizedOffsetArrayOf<Type, OffsetType, has_null> return_trace ((UnsizedOffsetArrayOf<Type, OffsetType, has_null>
@ -647,7 +647,7 @@ struct ArrayOf
return_trace (true); return_trace (true);
} }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false); if (unlikely (!sanitize_shallow (c))) return_trace (false);
@ -721,7 +721,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
} }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (OffsetArrayOf<Type>::sanitize (c, this, hb_forward<Ts> (ds)...)); return_trace (OffsetArrayOf<Type>::sanitize (c, this, hb_forward<Ts> (ds)...));
@ -823,7 +823,7 @@ struct ArrayOfM1
{ return lenM1.static_size + (lenM1 + 1) * Type::static_size; } { return lenM1.static_size + (lenM1 + 1) * Type::static_size; }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false); if (unlikely (!sanitize_shallow (c))) return_trace (false);
@ -1028,7 +1028,7 @@ struct VarSizedBinSearchArrayOf
return_trace (true); return_trace (true);
} }
template <typename ...Ts> template <typename ...Ts>
bool sanitize (hb_sanitize_context_t *c, Ts &&...ds) const bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false); if (unlikely (!sanitize_shallow (c))) return_trace (false);

View File

@ -122,7 +122,7 @@ struct KernSubTable
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
unsigned int subtable_type = get_type (); unsigned int subtable_type = get_type ();
TRACE_DISPATCH (this, subtable_type); TRACE_DISPATCH (this, subtable_type);
@ -305,7 +305,7 @@ struct kern
{ return dispatch (c); } { return dispatch (c); }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
unsigned int subtable_type = get_type (); unsigned int subtable_type = get_type ();
TRACE_DISPATCH (this, subtable_type); TRACE_DISPATCH (this, subtable_type);

View File

@ -683,7 +683,7 @@ struct Lookup
} }
template <typename TSubTable, typename context_t, typename ...Ts> template <typename TSubTable, typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
unsigned int lookup_type = get_type (); unsigned int lookup_type = get_type ();
TRACE_DISPATCH (this, lookup_type); TRACE_DISPATCH (this, lookup_type);

View File

@ -577,7 +577,7 @@ struct SinglePosFormat2
struct SinglePos struct SinglePos
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -908,7 +908,7 @@ struct PairPosFormat2
struct PairPos struct PairPos
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -1093,7 +1093,7 @@ struct CursivePosFormat1
struct CursivePos struct CursivePos
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -1209,7 +1209,7 @@ struct MarkBasePosFormat1
struct MarkBasePos struct MarkBasePos
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -1334,7 +1334,7 @@ struct MarkLigPosFormat1
struct MarkLigPos struct MarkLigPos
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -1456,7 +1456,7 @@ struct MarkMarkPosFormat1
struct MarkMarkPos struct MarkMarkPos
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -1508,7 +1508,7 @@ struct PosLookupSubTable
}; };
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, lookup_type); TRACE_DISPATCH (this, lookup_type);
switch (lookup_type) { switch (lookup_type) {
@ -1582,7 +1582,7 @@ struct PosLookup : Lookup
static typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index); static typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index);
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ return Lookup::dispatch<SubTable> (c, hb_forward<Ts> (ds)...); } { return Lookup::dispatch<SubTable> (c, hb_forward<Ts> (ds)...); }
bool subset (hb_subset_context_t *c) const bool subset (hb_subset_context_t *c) const

View File

@ -252,7 +252,7 @@ struct SingleSubst
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -441,7 +441,7 @@ struct MultipleSubst
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -615,7 +615,7 @@ struct AlternateSubst
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -946,7 +946,7 @@ struct LigatureSubst
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -1114,7 +1114,7 @@ struct ReverseChainSingleSubstFormat1
struct ReverseChainSingleSubst struct ReverseChainSingleSubst
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -1154,7 +1154,7 @@ struct SubstLookupSubTable
}; };
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, lookup_type); TRACE_DISPATCH (this, lookup_type);
switch (lookup_type) { switch (lookup_type) {
@ -1332,7 +1332,7 @@ struct SubstLookup : Lookup
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ return Lookup::dispatch<SubTable> (c, hb_forward<Ts> (ds)...); } { return Lookup::dispatch<SubTable> (c, hb_forward<Ts> (ds)...); }
bool subset (hb_subset_context_t *c) const bool subset (hb_subset_context_t *c) const

View File

@ -1764,7 +1764,7 @@ struct ContextFormat3
struct Context struct Context
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -2475,7 +2475,7 @@ struct ChainContextFormat3
struct ChainContext struct ChainContext
{ {
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
@ -2511,7 +2511,7 @@ struct ExtensionFormat1
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, format); TRACE_DISPATCH (this, format);
if (unlikely (!c->may_dispatch (this, this))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, this))) return_trace (c->no_dispatch_return_value ());
@ -2558,7 +2558,7 @@ struct Extension
} }
template <typename context_t, typename ...Ts> template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts &&...ds) const typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
{ {
TRACE_DISPATCH (this, u.format); TRACE_DISPATCH (this, u.format);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());

View File

@ -136,14 +136,14 @@ struct hb_sanitize_context_t :
private: private:
template <typename T, typename ...Ts> auto template <typename T, typename ...Ts> auto
_dispatch (const T &obj, hb_priority<1>, Ts &&...ds) HB_AUTO_RETURN _dispatch (const T &obj, hb_priority<1>, Ts&&... ds) HB_AUTO_RETURN
( obj.sanitize (this, hb_forward<Ts> (ds)...) ) ( obj.sanitize (this, hb_forward<Ts> (ds)...) )
template <typename T, typename ...Ts> auto template <typename T, typename ...Ts> auto
_dispatch (const T &obj, hb_priority<0>, Ts &&...ds) HB_AUTO_RETURN _dispatch (const T &obj, hb_priority<0>, Ts&&... ds) HB_AUTO_RETURN
( obj.dispatch (this, hb_forward<Ts> (ds)...) ) ( obj.dispatch (this, hb_forward<Ts> (ds)...) )
public: public:
template <typename T, typename ...Ts> auto template <typename T, typename ...Ts> auto
dispatch (const T &obj, Ts &&...ds) HB_AUTO_RETURN dispatch (const T &obj, Ts&&... ds) HB_AUTO_RETURN
( _dispatch (obj, hb_prioritize, hb_forward<Ts> (ds)...) ) ( _dispatch (obj, hb_prioritize, hb_forward<Ts> (ds)...) )

View File

@ -134,7 +134,7 @@ struct hb_serialize_context_t
template <typename T> bool propagate_error (T &&obj) template <typename T> bool propagate_error (T &&obj)
{ return check_success (!hb_deref (obj).in_error ()); } { return check_success (!hb_deref (obj).in_error ()); }
template <typename T1, typename... Ts> bool propagate_error (T1 &&o1, Ts &&...os) template <typename T1, typename... Ts> bool propagate_error (T1 &&o1, Ts&&... os)
{ return propagate_error (hb_forward<T1> (o1)) && { return propagate_error (hb_forward<T1> (o1)) &&
propagate_error (hb_forward<Ts> (os)...); } propagate_error (hb_forward<Ts> (os)...); }
@ -371,7 +371,7 @@ struct hb_serialize_context_t
{ return embed (hb_addressof (obj)); } { return embed (hb_addressof (obj)); }
template <typename Type, typename ...Ts> auto template <typename Type, typename ...Ts> auto
_copy (const Type &src, hb_priority<1>, Ts &&...ds) HB_RETURN _copy (const Type &src, hb_priority<1>, Ts&&... ds) HB_RETURN
(Type *, src.copy (this, hb_forward<Ts> (ds)...)) (Type *, src.copy (this, hb_forward<Ts> (ds)...))
template <typename Type> auto template <typename Type> auto
@ -386,10 +386,10 @@ struct hb_serialize_context_t
/* Like embed, but active: calls obj.operator=() or obj.copy() to transfer data /* Like embed, but active: calls obj.operator=() or obj.copy() to transfer data
* instead of memcpy(). */ * instead of memcpy(). */
template <typename Type, typename ...Ts> template <typename Type, typename ...Ts>
Type *copy (const Type &src, Ts &&...ds) Type *copy (const Type &src, Ts&&... ds)
{ return _copy (src, hb_prioritize, hb_forward<Ts> (ds)...); } { return _copy (src, hb_prioritize, hb_forward<Ts> (ds)...); }
template <typename Type, typename ...Ts> template <typename Type, typename ...Ts>
Type *copy (const Type *src, Ts &&...ds) Type *copy (const Type *src, Ts&&... ds)
{ return copy (*src, hb_forward<Ts> (ds)...); } { return copy (*src, hb_forward<Ts> (ds)...); }
template <typename Type> template <typename Type>
@ -414,10 +414,10 @@ struct hb_serialize_context_t
Type *extend_min (Type &obj) { return extend_min (hb_addressof (obj)); } Type *extend_min (Type &obj) { return extend_min (hb_addressof (obj)); }
template <typename Type, typename ...Ts> template <typename Type, typename ...Ts>
Type *extend (Type *obj, Ts &&...ds) Type *extend (Type *obj, Ts&&... ds)
{ return extend_size (obj, obj->get_size (hb_forward<Ts> (ds)...)); } { return extend_size (obj, obj->get_size (hb_forward<Ts> (ds)...)); }
template <typename Type, typename ...Ts> template <typename Type, typename ...Ts>
Type *extend (Type &obj, Ts &&...ds) Type *extend (Type &obj, Ts&&... ds)
{ return extend (hb_addressof (obj), hb_forward<Ts> (ds)...); } { return extend (hb_addressof (obj), hb_forward<Ts> (ds)...); }
/* Output routines. */ /* Output routines. */

View File

@ -44,14 +44,14 @@ struct hb_subset_context_t :
private: private:
template <typename T, typename ...Ts> auto template <typename T, typename ...Ts> auto
_dispatch (const T &obj, hb_priority<1>, Ts &&...ds) HB_AUTO_RETURN _dispatch (const T &obj, hb_priority<1>, Ts&&... ds) HB_AUTO_RETURN
( obj.subset (this, hb_forward<Ts> (ds)...) ) ( obj.subset (this, hb_forward<Ts> (ds)...) )
template <typename T, typename ...Ts> auto template <typename T, typename ...Ts> auto
_dispatch (const T &obj, hb_priority<0>, Ts &&...ds) HB_AUTO_RETURN _dispatch (const T &obj, hb_priority<0>, Ts&&... ds) HB_AUTO_RETURN
( obj.dispatch (this, hb_forward<Ts> (ds)...) ) ( obj.dispatch (this, hb_forward<Ts> (ds)...) )
public: public:
template <typename T, typename ...Ts> auto template <typename T, typename ...Ts> auto
dispatch (const T &obj, Ts &&...ds) HB_AUTO_RETURN dispatch (const T &obj, Ts&&... ds) HB_AUTO_RETURN
( _dispatch (obj, hb_prioritize, hb_forward<Ts> (ds)...) ) ( _dispatch (obj, hb_prioritize, hb_forward<Ts> (ds)...) )
hb_subset_plan_t *plan; hb_subset_plan_t *plan;