提交 83e3eabd 编写于 作者: B Behdad Esfahbod

Whitespace

上级 2b9402a8
......@@ -154,7 +154,7 @@ struct LookupSegmentArray
valuesZ.sanitize (c, base, last - first + 1));
}
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);
return_trace (c->check_struct (this) &&
......
......@@ -772,7 +772,7 @@ struct KerxSubTable
unsigned int get_type () const { return u.header.coverage & u.header.SubtableType; }
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 ();
TRACE_DISPATCH (this, subtable_type);
......
......@@ -884,7 +884,7 @@ struct ChainSubtable
};
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 ();
TRACE_DISPATCH (this, subtable_type);
......
......@@ -75,7 +75,7 @@ struct
/* Pointer-to-member-function. */
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)...))
/* Pointer-to-member. */
......@@ -85,13 +85,13 @@ struct
/* Operator(). */
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)...))
public:
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),
hb_prioritize,
......
......@@ -48,7 +48,7 @@ struct hb_dispatch_context_t
template <typename T, typename F>
bool may_dispatch (const T *obj HB_UNUSED, const F *format HB_UNUSED) { return true; }
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)...); }
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; }
......
......@@ -285,7 +285,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
}
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;
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(). */
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;
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>
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);
return_trace (sanitize_shallow (c, base) &&
......@@ -465,7 +465,7 @@ struct UnsizedArrayOf
return_trace (true);
}
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);
if (unlikely (!sanitize_shallow (c, count))) return_trace (false);
......@@ -511,7 +511,7 @@ struct UnsizedOffsetListOf : UnsizedOffsetArrayOf<Type, OffsetType, has_null>
}
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);
return_trace ((UnsizedOffsetArrayOf<Type, OffsetType, has_null>
......@@ -647,7 +647,7 @@ struct ArrayOf
return_trace (true);
}
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);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
......@@ -721,7 +721,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
}
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);
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; }
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);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
......@@ -1028,7 +1028,7 @@ struct VarSizedBinSearchArrayOf
return_trace (true);
}
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);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
......
......@@ -122,7 +122,7 @@ struct KernSubTable
}
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 ();
TRACE_DISPATCH (this, subtable_type);
......@@ -305,7 +305,7 @@ struct kern
{ return dispatch (c); }
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 ();
TRACE_DISPATCH (this, subtable_type);
......
......@@ -683,7 +683,7 @@ struct Lookup
}
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 ();
TRACE_DISPATCH (this, lookup_type);
......
......@@ -577,7 +577,7 @@ struct SinglePosFormat2
struct SinglePos
{
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......@@ -908,7 +908,7 @@ struct PairPosFormat2
struct PairPos
{
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......@@ -1093,7 +1093,7 @@ struct CursivePosFormat1
struct CursivePos
{
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......@@ -1209,7 +1209,7 @@ struct MarkBasePosFormat1
struct MarkBasePos
{
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......@@ -1334,7 +1334,7 @@ struct MarkLigPosFormat1
struct MarkLigPos
{
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......@@ -1456,7 +1456,7 @@ struct MarkMarkPosFormat1
struct MarkMarkPos
{
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);
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>
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);
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);
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)...); }
bool subset (hb_subset_context_t *c) const
......
......@@ -252,7 +252,7 @@ struct SingleSubst
}
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);
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>
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);
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>
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);
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>
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......@@ -1114,7 +1114,7 @@ struct ReverseChainSingleSubstFormat1
struct ReverseChainSingleSubst
{
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);
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>
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);
switch (lookup_type) {
......@@ -1332,7 +1332,7 @@ struct SubstLookup : Lookup
}
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)...); }
bool subset (hb_subset_context_t *c) const
......
......@@ -1764,7 +1764,7 @@ struct ContextFormat3
struct Context
{
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......@@ -2475,7 +2475,7 @@ struct ChainContextFormat3
struct ChainContext
{
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);
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>
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);
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>
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);
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
......
......@@ -136,14 +136,14 @@ struct hb_sanitize_context_t :
private:
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)...) )
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)...) )
public:
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)...) )
......
......@@ -134,7 +134,7 @@ struct hb_serialize_context_t
template <typename T> bool propagate_error (T &&obj)
{ 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)) &&
propagate_error (hb_forward<Ts> (os)...); }
......@@ -371,7 +371,7 @@ struct hb_serialize_context_t
{ return embed (hb_addressof (obj)); }
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)...))
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
* instead of memcpy(). */
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)...); }
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)...); }
template <typename Type>
......@@ -414,10 +414,10 @@ struct hb_serialize_context_t
Type *extend_min (Type &obj) { return extend_min (hb_addressof (obj)); }
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)...)); }
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)...); }
/* Output routines. */
......
......@@ -44,14 +44,14 @@ struct hb_subset_context_t :
private:
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)...) )
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)...) )
public:
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)...) )
hb_subset_plan_t *plan;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册