[meta] Use std::forward instead of hb_forward()
This commit is contained in:
parent
811f80a701
commit
6d555ce82e
|
@ -162,7 +162,7 @@ struct LookupSegmentArray
|
|||
TRACE_SANITIZE (this);
|
||||
return_trace (c->check_struct (this) &&
|
||||
first <= last &&
|
||||
valuesZ.sanitize (c, base, last - first + 1, hb_forward<Ts> (ds)...));
|
||||
valuesZ.sanitize (c, base, last - first + 1, std::forward<Ts> (ds)...));
|
||||
}
|
||||
|
||||
HBGlyphID16 last; /* Last GlyphID in this segment */
|
||||
|
|
|
@ -775,11 +775,11 @@ struct KerxSubTable
|
|||
unsigned int subtable_type = get_type ();
|
||||
TRACE_DISPATCH (this, subtable_type);
|
||||
switch (subtable_type) {
|
||||
case 0: return_trace (c->dispatch (u.format0, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 4: return_trace (c->dispatch (u.format4, hb_forward<Ts> (ds)...));
|
||||
case 6: return_trace (c->dispatch (u.format6, hb_forward<Ts> (ds)...));
|
||||
case 0: return_trace (c->dispatch (u.format0, std::forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
case 4: return_trace (c->dispatch (u.format4, std::forward<Ts> (ds)...));
|
||||
case 6: return_trace (c->dispatch (u.format6, std::forward<Ts> (ds)...));
|
||||
default: return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -906,11 +906,11 @@ struct ChainSubtable
|
|||
unsigned int subtable_type = get_type ();
|
||||
TRACE_DISPATCH (this, subtable_type);
|
||||
switch (subtable_type) {
|
||||
case Rearrangement: return_trace (c->dispatch (u.rearrangement, hb_forward<Ts> (ds)...));
|
||||
case Contextual: return_trace (c->dispatch (u.contextual, hb_forward<Ts> (ds)...));
|
||||
case Ligature: return_trace (c->dispatch (u.ligature, hb_forward<Ts> (ds)...));
|
||||
case Noncontextual: return_trace (c->dispatch (u.noncontextual, hb_forward<Ts> (ds)...));
|
||||
case Insertion: return_trace (c->dispatch (u.insertion, hb_forward<Ts> (ds)...));
|
||||
case Rearrangement: return_trace (c->dispatch (u.rearrangement, std::forward<Ts> (ds)...));
|
||||
case Contextual: return_trace (c->dispatch (u.contextual, std::forward<Ts> (ds)...));
|
||||
case Ligature: return_trace (c->dispatch (u.ligature, std::forward<Ts> (ds)...));
|
||||
case Noncontextual: return_trace (c->dispatch (u.noncontextual, std::forward<Ts> (ds)...));
|
||||
case Insertion: return_trace (c->dispatch (u.insertion, std::forward<Ts> (ds)...));
|
||||
default: return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ struct
|
|||
{
|
||||
/* Note. This is dangerous in that if it's passed an rvalue, it returns rvalue-reference. */
|
||||
template <typename T> constexpr auto
|
||||
operator () (T&& v) const HB_AUTO_RETURN ( hb_forward<T> (v) )
|
||||
operator () (T&& v) const HB_AUTO_RETURN ( std::forward<T> (v) )
|
||||
}
|
||||
HB_FUNCOBJ (hb_identity);
|
||||
struct
|
||||
|
@ -206,7 +206,7 @@ HB_FUNCOBJ (hb_ridentity);
|
|||
struct
|
||||
{
|
||||
template <typename T> constexpr bool
|
||||
operator () (T&& v) const { return bool (hb_forward<T> (v)); }
|
||||
operator () (T&& v) const { return bool (std::forward<T> (v)); }
|
||||
}
|
||||
HB_FUNCOBJ (hb_bool);
|
||||
|
||||
|
@ -240,26 +240,26 @@ struct
|
|||
/* Pointer-to-member-function. */
|
||||
template <typename Appl, typename T, typename ...Ts> auto
|
||||
impl (Appl&& a, hb_priority<2>, T &&v, Ts&&... ds) const HB_AUTO_RETURN
|
||||
((hb_deref (hb_forward<T> (v)).*hb_forward<Appl> (a)) (hb_forward<Ts> (ds)...))
|
||||
((hb_deref (std::forward<T> (v)).*std::forward<Appl> (a)) (std::forward<Ts> (ds)...))
|
||||
|
||||
/* Pointer-to-member. */
|
||||
template <typename Appl, typename T> auto
|
||||
impl (Appl&& a, hb_priority<1>, T &&v) const HB_AUTO_RETURN
|
||||
((hb_deref (hb_forward<T> (v))).*hb_forward<Appl> (a))
|
||||
((hb_deref (std::forward<T> (v))).*std::forward<Appl> (a))
|
||||
|
||||
/* Operator(). */
|
||||
template <typename Appl, typename ...Ts> auto
|
||||
impl (Appl&& a, hb_priority<0>, Ts&&... ds) const HB_AUTO_RETURN
|
||||
(hb_deref (hb_forward<Appl> (a)) (hb_forward<Ts> (ds)...))
|
||||
(hb_deref (std::forward<Appl> (a)) (std::forward<Ts> (ds)...))
|
||||
|
||||
public:
|
||||
|
||||
template <typename Appl, typename ...Ts> auto
|
||||
operator () (Appl&& a, Ts&&... ds) const HB_AUTO_RETURN
|
||||
(
|
||||
impl (hb_forward<Appl> (a),
|
||||
impl (std::forward<Appl> (a),
|
||||
hb_prioritize,
|
||||
hb_forward<Ts> (ds)...)
|
||||
std::forward<Ts> (ds)...)
|
||||
)
|
||||
}
|
||||
HB_FUNCOBJ (hb_invoke);
|
||||
|
@ -278,9 +278,9 @@ struct hb_partial_t
|
|||
hb_declval (V),
|
||||
hb_declval (Ts)...))
|
||||
{
|
||||
return hb_invoke (hb_forward<Appl> (a),
|
||||
hb_forward<V> (v),
|
||||
hb_forward<Ts> (ds)...);
|
||||
return hb_invoke (std::forward<Appl> (a),
|
||||
std::forward<V> (v),
|
||||
std::forward<Ts> (ds)...);
|
||||
}
|
||||
template <typename T0, typename ...Ts,
|
||||
unsigned P = Pos,
|
||||
|
@ -290,10 +290,10 @@ struct hb_partial_t
|
|||
hb_declval (V),
|
||||
hb_declval (Ts)...))
|
||||
{
|
||||
return hb_invoke (hb_forward<Appl> (a),
|
||||
hb_forward<T0> (d0),
|
||||
hb_forward<V> (v),
|
||||
hb_forward<Ts> (ds)...);
|
||||
return hb_invoke (std::forward<Appl> (a),
|
||||
std::forward<T0> (d0),
|
||||
std::forward<V> (v),
|
||||
std::forward<Ts> (ds)...);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -327,14 +327,14 @@ auto hb_partial (Appl&& a, V&& v) HB_AUTO_RETURN
|
|||
#define HB_PARTIALIZE(Pos) \
|
||||
template <typename _T> \
|
||||
decltype(auto) operator () (_T&& _v) const \
|
||||
{ return hb_partial<Pos> (this, hb_forward<_T> (_v)); } \
|
||||
{ return hb_partial<Pos> (this, std::forward<_T> (_v)); } \
|
||||
static_assert (true, "")
|
||||
#else
|
||||
/* https://github.com/harfbuzz/harfbuzz/issues/1724 */
|
||||
#define HB_PARTIALIZE(Pos) \
|
||||
template <typename _T> \
|
||||
auto operator () (_T&& _v) const HB_AUTO_RETURN \
|
||||
(hb_partial<Pos> (+this, hb_forward<_T> (_v))) \
|
||||
(hb_partial<Pos> (+this, std::forward<_T> (_v))) \
|
||||
static_assert (true, "")
|
||||
#endif
|
||||
|
||||
|
@ -346,22 +346,22 @@ struct
|
|||
template <typename Pred, typename Val> auto
|
||||
impl (Pred&& p, Val &&v, hb_priority<1>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_deref (hb_forward<Pred> (p)).has (hb_forward<Val> (v))
|
||||
hb_deref (std::forward<Pred> (p)).has (std::forward<Val> (v))
|
||||
)
|
||||
|
||||
template <typename Pred, typename Val> auto
|
||||
impl (Pred&& p, Val &&v, hb_priority<0>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_invoke (hb_forward<Pred> (p),
|
||||
hb_forward<Val> (v))
|
||||
hb_invoke (std::forward<Pred> (p),
|
||||
std::forward<Val> (v))
|
||||
)
|
||||
|
||||
public:
|
||||
|
||||
template <typename Pred, typename Val> auto
|
||||
operator () (Pred&& p, Val &&v) const HB_RETURN (bool,
|
||||
impl (hb_forward<Pred> (p),
|
||||
hb_forward<Val> (v),
|
||||
impl (std::forward<Pred> (p),
|
||||
std::forward<Val> (v),
|
||||
hb_prioritize)
|
||||
)
|
||||
}
|
||||
|
@ -374,22 +374,22 @@ struct
|
|||
template <typename Pred, typename Val> auto
|
||||
impl (Pred&& p, Val &&v, hb_priority<1>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_has (hb_forward<Pred> (p),
|
||||
hb_forward<Val> (v))
|
||||
hb_has (std::forward<Pred> (p),
|
||||
std::forward<Val> (v))
|
||||
)
|
||||
|
||||
template <typename Pred, typename Val> auto
|
||||
impl (Pred&& p, Val &&v, hb_priority<0>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_forward<Pred> (p) == hb_forward<Val> (v)
|
||||
std::forward<Pred> (p) == std::forward<Val> (v)
|
||||
)
|
||||
|
||||
public:
|
||||
|
||||
template <typename Pred, typename Val> auto
|
||||
operator () (Pred&& p, Val &&v) const HB_RETURN (bool,
|
||||
impl (hb_forward<Pred> (p),
|
||||
hb_forward<Val> (v),
|
||||
impl (std::forward<Pred> (p),
|
||||
std::forward<Val> (v),
|
||||
hb_prioritize)
|
||||
)
|
||||
}
|
||||
|
@ -402,20 +402,20 @@ struct
|
|||
template <typename Proj, typename Val> auto
|
||||
impl (Proj&& f, Val &&v, hb_priority<2>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_deref (hb_forward<Proj> (f)).get (hb_forward<Val> (v))
|
||||
hb_deref (std::forward<Proj> (f)).get (std::forward<Val> (v))
|
||||
)
|
||||
|
||||
template <typename Proj, typename Val> auto
|
||||
impl (Proj&& f, Val &&v, hb_priority<1>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_invoke (hb_forward<Proj> (f),
|
||||
hb_forward<Val> (v))
|
||||
hb_invoke (std::forward<Proj> (f),
|
||||
std::forward<Val> (v))
|
||||
)
|
||||
|
||||
template <typename Proj, typename Val> auto
|
||||
impl (Proj&& f, Val &&v, hb_priority<0>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_forward<Proj> (f)[hb_forward<Val> (v)]
|
||||
std::forward<Proj> (f)[std::forward<Val> (v)]
|
||||
)
|
||||
|
||||
public:
|
||||
|
@ -423,8 +423,8 @@ struct
|
|||
template <typename Proj, typename Val> auto
|
||||
operator () (Proj&& f, Val &&v) const HB_AUTO_RETURN
|
||||
(
|
||||
impl (hb_forward<Proj> (f),
|
||||
hb_forward<Val> (v),
|
||||
impl (std::forward<Proj> (f),
|
||||
std::forward<Val> (v),
|
||||
hb_prioritize)
|
||||
)
|
||||
}
|
||||
|
@ -437,19 +437,19 @@ struct
|
|||
template <typename T1, typename T2> auto
|
||||
impl (T1&& v1, T2 &&v2, hb_priority<2>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_forward<T2> (v2).cmp (hb_forward<T1> (v1)) == 0
|
||||
std::forward<T2> (v2).cmp (std::forward<T1> (v1)) == 0
|
||||
)
|
||||
|
||||
template <typename T1, typename T2> auto
|
||||
impl (T1&& v1, T2 &&v2, hb_priority<1>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_forward<T1> (v1).cmp (hb_forward<T2> (v2)) == 0
|
||||
std::forward<T1> (v1).cmp (std::forward<T2> (v2)) == 0
|
||||
)
|
||||
|
||||
template <typename T1, typename T2> auto
|
||||
impl (T1&& v1, T2 &&v2, hb_priority<0>) const HB_AUTO_RETURN
|
||||
(
|
||||
hb_forward<T1> (v1) == hb_forward<T2> (v2)
|
||||
std::forward<T1> (v1) == std::forward<T2> (v2)
|
||||
)
|
||||
|
||||
public:
|
||||
|
@ -457,8 +457,8 @@ struct
|
|||
template <typename T1, typename T2> auto
|
||||
operator () (T1&& v1, T2 &&v2) const HB_AUTO_RETURN
|
||||
(
|
||||
impl (hb_forward<T1> (v1),
|
||||
hb_forward<T2> (v2),
|
||||
impl (std::forward<T1> (v1),
|
||||
std::forward<T2> (v2),
|
||||
hb_prioritize)
|
||||
)
|
||||
}
|
||||
|
@ -518,21 +518,21 @@ struct
|
|||
{
|
||||
template <typename T, typename T2> constexpr auto
|
||||
operator () (T&& a, T2&& b) const HB_AUTO_RETURN
|
||||
(a <= b ? hb_forward<T> (a) : hb_forward<T2> (b))
|
||||
(a <= b ? std::forward<T> (a) : std::forward<T2> (b))
|
||||
}
|
||||
HB_FUNCOBJ (hb_min);
|
||||
struct
|
||||
{
|
||||
template <typename T, typename T2> constexpr auto
|
||||
operator () (T&& a, T2&& b) const HB_AUTO_RETURN
|
||||
(a >= b ? hb_forward<T> (a) : hb_forward<T2> (b))
|
||||
(a >= b ? std::forward<T> (a) : std::forward<T2> (b))
|
||||
}
|
||||
HB_FUNCOBJ (hb_max);
|
||||
struct
|
||||
{
|
||||
template <typename T, typename T2, typename T3> constexpr auto
|
||||
operator () (T&& x, T2&& min, T3&& max) const HB_AUTO_RETURN
|
||||
(hb_min (hb_max (hb_forward<T> (x), hb_forward<T2> (min)), hb_forward<T3> (max)))
|
||||
(hb_min (hb_max (std::forward<T> (x), std::forward<T2> (min)), std::forward<T3> (max)))
|
||||
}
|
||||
HB_FUNCOBJ (hb_clamp);
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ struct hb_auto_trace_t
|
|||
{
|
||||
if (unlikely (returned)) {
|
||||
fprintf (stderr, "OUCH, double calls to return_trace(). This is a bug, please report.\n");
|
||||
return hb_forward<T> (v);
|
||||
return std::forward<T> (v);
|
||||
}
|
||||
|
||||
_hb_debug_msg<max_level> (what, obj, func, true, plevel ? *plevel : 1, -1,
|
||||
|
@ -311,7 +311,7 @@ struct hb_auto_trace_t
|
|||
if (plevel) --*plevel;
|
||||
plevel = nullptr;
|
||||
returned = true;
|
||||
return hb_forward<T> (v);
|
||||
return std::forward<T> (v);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -333,7 +333,7 @@ struct hb_auto_trace_t<0, ret_t>
|
|||
template <typename T>
|
||||
T ret (T&& v,
|
||||
const char *func HB_UNUSED = nullptr,
|
||||
unsigned int line HB_UNUSED = 0) { return hb_forward<T> (v); }
|
||||
unsigned int line HB_UNUSED = 0) { return std::forward<T> (v); }
|
||||
};
|
||||
|
||||
/* For disabled tracing; optimize out everything.
|
||||
|
@ -343,7 +343,7 @@ struct hb_no_trace_t {
|
|||
template <typename T>
|
||||
T ret (T&& v,
|
||||
const char *func HB_UNUSED = nullptr,
|
||||
unsigned int line HB_UNUSED = 0) { return hb_forward<T> (v); }
|
||||
unsigned int line HB_UNUSED = 0) { return std::forward<T> (v); }
|
||||
};
|
||||
|
||||
#define return_trace(RET) return trace.ret (RET, HB_FUNC, __LINE__)
|
||||
|
|
|
@ -50,7 +50,7 @@ struct hb_dispatch_context_t
|
|||
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 obj.dispatch (thiz (), hb_forward<Ts> (ds)...); }
|
||||
{ return obj.dispatch (thiz (), std::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; }
|
||||
unsigned debug_depth = 0;
|
||||
|
|
|
@ -162,7 +162,7 @@ struct
|
|||
{
|
||||
template <typename T> hb_iter_type<T>
|
||||
operator () (T&& c) const
|
||||
{ return hb_deref (hb_forward<T> (c)).iter (); }
|
||||
{ return hb_deref (std::forward<T> (c)).iter (); }
|
||||
|
||||
/* Specialization for C arrays. */
|
||||
|
||||
|
@ -353,7 +353,7 @@ static inline auto end (Iterable&& iterable) HB_AUTO_RETURN (hb_iter (iterable).
|
|||
template <typename Lhs, typename Rhs,
|
||||
hb_requires (hb_is_iterator (Lhs))>
|
||||
static inline auto
|
||||
operator | (Lhs&& lhs, Rhs&& rhs) HB_AUTO_RETURN (hb_forward<Rhs> (rhs) (hb_forward<Lhs> (lhs)))
|
||||
operator | (Lhs&& lhs, Rhs&& rhs) HB_AUTO_RETURN (std::forward<Rhs> (rhs) (std::forward<Lhs> (lhs)))
|
||||
|
||||
/* hb_map(), hb_filter(), hb_reduce() */
|
||||
|
||||
|
@ -674,8 +674,8 @@ struct hb_iota_iter_t :
|
|||
template <typename S2 = S>
|
||||
auto
|
||||
inc (hb_type_identity<S2> s, hb_priority<1>)
|
||||
-> hb_void_t<decltype (hb_invoke (hb_forward<S2> (s), hb_declval<T&> ()))>
|
||||
{ v = hb_invoke (hb_forward<S2> (s), v); }
|
||||
-> hb_void_t<decltype (hb_invoke (std::forward<S2> (s), hb_declval<T&> ()))>
|
||||
{ v = hb_invoke (std::forward<S2> (s), v); }
|
||||
|
||||
void
|
||||
inc (S s, hb_priority<0>)
|
||||
|
@ -874,7 +874,7 @@ struct
|
|||
Proj&& f = hb_identity) const
|
||||
{
|
||||
for (auto it = hb_iter (c); it; ++it)
|
||||
if (!hb_match (hb_forward<Pred> (p), hb_get (hb_forward<Proj> (f), *it)))
|
||||
if (!hb_match (std::forward<Pred> (p), hb_get (std::forward<Proj> (f), *it)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -891,7 +891,7 @@ struct
|
|||
Proj&& f = hb_identity) const
|
||||
{
|
||||
for (auto it = hb_iter (c); it; ++it)
|
||||
if (hb_match (hb_forward<Pred> (p), hb_get (hb_forward<Proj> (f), *it)))
|
||||
if (hb_match (std::forward<Pred> (p), hb_get (std::forward<Proj> (f), *it)))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -908,7 +908,7 @@ struct
|
|||
Proj&& f = hb_identity) const
|
||||
{
|
||||
for (auto it = hb_iter (c); it; ++it)
|
||||
if (hb_match (hb_forward<Pred> (p), hb_get (hb_forward<Proj> (f), *it)))
|
||||
if (hb_match (std::forward<Pred> (p), hb_get (std::forward<Proj> (f), *it)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -175,17 +175,11 @@ using hb_is_cr_convertible = hb_bool_constant<
|
|||
>;
|
||||
#define hb_is_cr_convertible(From,To) hb_is_cr_convertible<From, To>::value
|
||||
|
||||
/* std::forward */
|
||||
|
||||
template <typename T>
|
||||
static constexpr T&& hb_forward (hb_remove_reference<T>& t) { return (T&&) t; }
|
||||
template <typename T>
|
||||
static constexpr T&& hb_forward (hb_remove_reference<T>&& t) { return (T&&) t; }
|
||||
|
||||
struct
|
||||
{
|
||||
template <typename T> constexpr auto
|
||||
operator () (T&& v) const HB_AUTO_RETURN (hb_forward<T> (v))
|
||||
operator () (T&& v) const HB_AUTO_RETURN (std::forward<T> (v))
|
||||
|
||||
template <typename T> constexpr auto
|
||||
operator () (T *v) const HB_AUTO_RETURN (*v)
|
||||
|
@ -195,7 +189,7 @@ HB_FUNCOBJ (hb_deref);
|
|||
struct
|
||||
{
|
||||
template <typename T> constexpr auto
|
||||
operator () (T&& v) const HB_AUTO_RETURN (hb_forward<T> (v))
|
||||
operator () (T&& v) const HB_AUTO_RETURN (std::forward<T> (v))
|
||||
|
||||
template <typename T> constexpr auto
|
||||
operator () (T& v) const HB_AUTO_RETURN (hb_addressof (v))
|
||||
|
|
|
@ -341,7 +341,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
|||
|
||||
s->push ();
|
||||
|
||||
bool ret = c->dispatch (src_base+src, hb_forward<Ts> (ds)...);
|
||||
bool ret = c->dispatch (src_base+src, std::forward<Ts> (ds)...);
|
||||
|
||||
if (ret || !has_null)
|
||||
s->add_link (*this, s->pop_pack ());
|
||||
|
@ -358,7 +358,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
|||
*this = 0;
|
||||
|
||||
Type* obj = c->push<Type> ();
|
||||
bool ret = obj->serialize (c, hb_forward<Ts> (ds)...);
|
||||
bool ret = obj->serialize (c, std::forward<Ts> (ds)...);
|
||||
|
||||
if (ret)
|
||||
c->add_link (*this, c->pop_pack ());
|
||||
|
@ -384,7 +384,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
|||
|
||||
c->push ();
|
||||
|
||||
bool ret = c->copy (src_base+src, hb_forward<Ts> (ds)...);
|
||||
bool ret = c->copy (src_base+src, std::forward<Ts> (ds)...);
|
||||
|
||||
c->add_link (*this, c->pop_pack (), whence, dst_bias);
|
||||
|
||||
|
@ -410,7 +410,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
|||
TRACE_SANITIZE (this);
|
||||
return_trace (sanitize_shallow (c, base) &&
|
||||
(this->is_null () ||
|
||||
c->dispatch (StructAtOffset<Type> (base, *this), hb_forward<Ts> (ds)...) ||
|
||||
c->dispatch (StructAtOffset<Type> (base, *this), std::forward<Ts> (ds)...) ||
|
||||
neuter (c)));
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ struct UnsizedArrayOf
|
|||
if (unlikely (!sanitize_shallow (c, count))) return_trace (false);
|
||||
if (!sizeof... (Ts) && std::is_trivially_copyable<Type>::value) return_trace (true);
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
|
||||
if (unlikely (!c->dispatch (arrayZ[i], std::forward<Ts> (ds)...)))
|
||||
return_trace (false);
|
||||
return_trace (true);
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ struct UnsizedListOfOffset16To : UnsizedArray16OfOffsetTo<Type, OffsetType, has_
|
|||
{
|
||||
TRACE_SANITIZE (this);
|
||||
return_trace ((UnsizedArray16OfOffsetTo<Type, OffsetType, has_null>
|
||||
::sanitize (c, count, this, hb_forward<Ts> (ds)...)));
|
||||
::sanitize (c, count, this, std::forward<Ts> (ds)...)));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -710,7 +710,7 @@ struct ArrayOf
|
|||
if (!sizeof... (Ts) && std::is_trivially_copyable<Type>::value) return_trace (true);
|
||||
unsigned int count = len;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
|
||||
if (unlikely (!c->dispatch (arrayZ[i], std::forward<Ts> (ds)...)))
|
||||
return_trace (false);
|
||||
return_trace (true);
|
||||
}
|
||||
|
@ -768,7 +768,7 @@ struct List16OfOffset16To : Array16OfOffset16To<Type>
|
|||
bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
return_trace (Array16OfOffset16To<Type>::sanitize (c, this, hb_forward<Ts> (ds)...));
|
||||
return_trace (Array16OfOffset16To<Type>::sanitize (c, this, std::forward<Ts> (ds)...));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -838,7 +838,7 @@ struct HeadlessArrayOf
|
|||
if (!sizeof... (Ts) && std::is_trivially_copyable<Type>::value) return_trace (true);
|
||||
unsigned int count = get_length ();
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
|
||||
if (unlikely (!c->dispatch (arrayZ[i], std::forward<Ts> (ds)...)))
|
||||
return_trace (false);
|
||||
return_trace (true);
|
||||
}
|
||||
|
@ -887,7 +887,7 @@ struct ArrayOfM1
|
|||
if (!sizeof... (Ts) && std::is_trivially_copyable<Type>::value) return_trace (true);
|
||||
unsigned int count = lenM1 + 1;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
|
||||
if (unlikely (!c->dispatch (arrayZ[i], std::forward<Ts> (ds)...)))
|
||||
return_trace (false);
|
||||
return_trace (true);
|
||||
}
|
||||
|
@ -1073,7 +1073,7 @@ struct VarSizedBinSearchArrayOf
|
|||
if (!sizeof... (Ts) && std::is_trivially_copyable<Type>::value) return_trace (true);
|
||||
unsigned int count = get_length ();
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (unlikely (!(*this)[i].sanitize (c, hb_forward<Ts> (ds)...)))
|
||||
if (unlikely (!(*this)[i].sanitize (c, std::forward<Ts> (ds)...)))
|
||||
return_trace (false);
|
||||
return_trace (true);
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ struct Dict : UnsizedByteStr
|
|||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
for (unsigned int i = 0; i < dictval.get_count (); i++)
|
||||
if (unlikely (!opszr.serialize (c, dictval[i], hb_forward<Ts> (ds)...)))
|
||||
if (unlikely (!opszr.serialize (c, dictval[i], std::forward<Ts> (ds)...)))
|
||||
return_trace (false);
|
||||
|
||||
return_trace (true);
|
||||
|
|
|
@ -925,8 +925,8 @@ struct ClipBox
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -1065,38 +1065,38 @@ struct Paint
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.paintformat1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.paintformat2, hb_forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.paintformat3, hb_forward<Ts> (ds)...));
|
||||
case 4: return_trace (c->dispatch (u.paintformat4, hb_forward<Ts> (ds)...));
|
||||
case 5: return_trace (c->dispatch (u.paintformat5, hb_forward<Ts> (ds)...));
|
||||
case 6: return_trace (c->dispatch (u.paintformat6, hb_forward<Ts> (ds)...));
|
||||
case 7: return_trace (c->dispatch (u.paintformat7, hb_forward<Ts> (ds)...));
|
||||
case 8: return_trace (c->dispatch (u.paintformat8, hb_forward<Ts> (ds)...));
|
||||
case 9: return_trace (c->dispatch (u.paintformat9, hb_forward<Ts> (ds)...));
|
||||
case 10: return_trace (c->dispatch (u.paintformat10, hb_forward<Ts> (ds)...));
|
||||
case 11: return_trace (c->dispatch (u.paintformat11, hb_forward<Ts> (ds)...));
|
||||
case 12: return_trace (c->dispatch (u.paintformat12, hb_forward<Ts> (ds)...));
|
||||
case 13: return_trace (c->dispatch (u.paintformat13, hb_forward<Ts> (ds)...));
|
||||
case 14: return_trace (c->dispatch (u.paintformat14, hb_forward<Ts> (ds)...));
|
||||
case 15: return_trace (c->dispatch (u.paintformat15, hb_forward<Ts> (ds)...));
|
||||
case 16: return_trace (c->dispatch (u.paintformat16, hb_forward<Ts> (ds)...));
|
||||
case 17: return_trace (c->dispatch (u.paintformat17, hb_forward<Ts> (ds)...));
|
||||
case 18: return_trace (c->dispatch (u.paintformat18, hb_forward<Ts> (ds)...));
|
||||
case 19: return_trace (c->dispatch (u.paintformat19, hb_forward<Ts> (ds)...));
|
||||
case 20: return_trace (c->dispatch (u.paintformat20, hb_forward<Ts> (ds)...));
|
||||
case 21: return_trace (c->dispatch (u.paintformat21, hb_forward<Ts> (ds)...));
|
||||
case 22: return_trace (c->dispatch (u.paintformat22, hb_forward<Ts> (ds)...));
|
||||
case 23: return_trace (c->dispatch (u.paintformat23, hb_forward<Ts> (ds)...));
|
||||
case 24: return_trace (c->dispatch (u.paintformat24, hb_forward<Ts> (ds)...));
|
||||
case 25: return_trace (c->dispatch (u.paintformat25, hb_forward<Ts> (ds)...));
|
||||
case 26: return_trace (c->dispatch (u.paintformat26, hb_forward<Ts> (ds)...));
|
||||
case 27: return_trace (c->dispatch (u.paintformat27, hb_forward<Ts> (ds)...));
|
||||
case 28: return_trace (c->dispatch (u.paintformat28, hb_forward<Ts> (ds)...));
|
||||
case 29: return_trace (c->dispatch (u.paintformat29, hb_forward<Ts> (ds)...));
|
||||
case 30: return_trace (c->dispatch (u.paintformat30, hb_forward<Ts> (ds)...));
|
||||
case 31: return_trace (c->dispatch (u.paintformat31, hb_forward<Ts> (ds)...));
|
||||
case 32: return_trace (c->dispatch (u.paintformat32, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.paintformat1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.paintformat2, std::forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.paintformat3, std::forward<Ts> (ds)...));
|
||||
case 4: return_trace (c->dispatch (u.paintformat4, std::forward<Ts> (ds)...));
|
||||
case 5: return_trace (c->dispatch (u.paintformat5, std::forward<Ts> (ds)...));
|
||||
case 6: return_trace (c->dispatch (u.paintformat6, std::forward<Ts> (ds)...));
|
||||
case 7: return_trace (c->dispatch (u.paintformat7, std::forward<Ts> (ds)...));
|
||||
case 8: return_trace (c->dispatch (u.paintformat8, std::forward<Ts> (ds)...));
|
||||
case 9: return_trace (c->dispatch (u.paintformat9, std::forward<Ts> (ds)...));
|
||||
case 10: return_trace (c->dispatch (u.paintformat10, std::forward<Ts> (ds)...));
|
||||
case 11: return_trace (c->dispatch (u.paintformat11, std::forward<Ts> (ds)...));
|
||||
case 12: return_trace (c->dispatch (u.paintformat12, std::forward<Ts> (ds)...));
|
||||
case 13: return_trace (c->dispatch (u.paintformat13, std::forward<Ts> (ds)...));
|
||||
case 14: return_trace (c->dispatch (u.paintformat14, std::forward<Ts> (ds)...));
|
||||
case 15: return_trace (c->dispatch (u.paintformat15, std::forward<Ts> (ds)...));
|
||||
case 16: return_trace (c->dispatch (u.paintformat16, std::forward<Ts> (ds)...));
|
||||
case 17: return_trace (c->dispatch (u.paintformat17, std::forward<Ts> (ds)...));
|
||||
case 18: return_trace (c->dispatch (u.paintformat18, std::forward<Ts> (ds)...));
|
||||
case 19: return_trace (c->dispatch (u.paintformat19, std::forward<Ts> (ds)...));
|
||||
case 20: return_trace (c->dispatch (u.paintformat20, std::forward<Ts> (ds)...));
|
||||
case 21: return_trace (c->dispatch (u.paintformat21, std::forward<Ts> (ds)...));
|
||||
case 22: return_trace (c->dispatch (u.paintformat22, std::forward<Ts> (ds)...));
|
||||
case 23: return_trace (c->dispatch (u.paintformat23, std::forward<Ts> (ds)...));
|
||||
case 24: return_trace (c->dispatch (u.paintformat24, std::forward<Ts> (ds)...));
|
||||
case 25: return_trace (c->dispatch (u.paintformat25, std::forward<Ts> (ds)...));
|
||||
case 26: return_trace (c->dispatch (u.paintformat26, std::forward<Ts> (ds)...));
|
||||
case 27: return_trace (c->dispatch (u.paintformat27, std::forward<Ts> (ds)...));
|
||||
case 28: return_trace (c->dispatch (u.paintformat28, std::forward<Ts> (ds)...));
|
||||
case 29: return_trace (c->dispatch (u.paintformat29, std::forward<Ts> (ds)...));
|
||||
case 30: return_trace (c->dispatch (u.paintformat30, std::forward<Ts> (ds)...));
|
||||
case 31: return_trace (c->dispatch (u.paintformat31, std::forward<Ts> (ds)...));
|
||||
case 32: return_trace (c->dispatch (u.paintformat32, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,11 +134,11 @@ struct KernSubTable
|
|||
switch (subtable_type) {
|
||||
case 0: return_trace (c->dispatch (u.format0));
|
||||
#ifndef HB_NO_AAT_SHAPE
|
||||
case 1: return_trace (u.header.apple ? c->dispatch (u.format1, hb_forward<Ts> (ds)...) : c->default_return_value ());
|
||||
case 1: return_trace (u.header.apple ? c->dispatch (u.format1, std::forward<Ts> (ds)...) : c->default_return_value ());
|
||||
#endif
|
||||
case 2: return_trace (c->dispatch (u.format2));
|
||||
#ifndef HB_NO_AAT_SHAPE
|
||||
case 3: return_trace (u.header.apple ? c->dispatch (u.format3, hb_forward<Ts> (ds)...) : c->default_return_value ());
|
||||
case 3: return_trace (u.header.apple ? c->dispatch (u.format3, std::forward<Ts> (ds)...) : c->default_return_value ());
|
||||
#endif
|
||||
default: return_trace (c->default_return_value ());
|
||||
}
|
||||
|
@ -325,9 +325,9 @@ struct kern
|
|||
unsigned int subtable_type = get_type ();
|
||||
TRACE_DISPATCH (this, subtable_type);
|
||||
switch (subtable_type) {
|
||||
case 0: return_trace (c->dispatch (u.ot, hb_forward<Ts> (ds)...));
|
||||
case 0: return_trace (c->dispatch (u.ot, std::forward<Ts> (ds)...));
|
||||
#ifndef HB_NO_AAT_SHAPE
|
||||
case 1: return_trace (c->dispatch (u.aat, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.aat, std::forward<Ts> (ds)...));
|
||||
#endif
|
||||
default: return_trace (c->default_return_value ());
|
||||
}
|
||||
|
|
|
@ -1286,7 +1286,7 @@ struct Lookup
|
|||
TRACE_DISPATCH (this, lookup_type);
|
||||
unsigned int count = get_subtable_count ();
|
||||
for (unsigned int i = 0; i < count; i++) {
|
||||
typename context_t::return_t r = get_subtable<TSubTable> (i).dispatch (c, lookup_type, hb_forward<Ts> (ds)...);
|
||||
typename context_t::return_t r = get_subtable<TSubTable> (i).dispatch (c, lookup_type, std::forward<Ts> (ds)...);
|
||||
if (c->stop_sublookup_iteration (r))
|
||||
return_trace (r);
|
||||
}
|
||||
|
@ -2984,7 +2984,7 @@ struct Condition
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -248,9 +248,9 @@ struct CaretValue
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.format3, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1050,8 +1050,8 @@ struct SinglePos
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -1702,8 +1702,8 @@ struct PairPos
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -1959,7 +1959,7 @@ struct CursivePos
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -2194,7 +2194,7 @@ struct MarkBasePos
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -2434,7 +2434,7 @@ struct MarkLigPos
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -2653,7 +2653,7 @@ struct MarkMarkPos
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -2704,15 +2704,15 @@ struct PosLookupSubTable
|
|||
{
|
||||
TRACE_DISPATCH (this, lookup_type);
|
||||
switch (lookup_type) {
|
||||
case Single: return_trace (u.single.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Pair: return_trace (u.pair.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Cursive: return_trace (u.cursive.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case MarkBase: return_trace (u.markBase.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case MarkLig: return_trace (u.markLig.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case MarkMark: return_trace (u.markMark.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Context: return_trace (u.context.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case ChainContext: return_trace (u.chainContext.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Extension: return_trace (u.extension.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Single: return_trace (u.single.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Pair: return_trace (u.pair.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Cursive: return_trace (u.cursive.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case MarkBase: return_trace (u.markBase.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case MarkLig: return_trace (u.markLig.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case MarkMark: return_trace (u.markMark.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Context: return_trace (u.context.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case ChainContext: return_trace (u.chainContext.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Extension: return_trace (u.extension.dispatch (c, std::forward<Ts> (ds)...));
|
||||
default: return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -2800,7 +2800,7 @@ struct PosLookup : Lookup
|
|||
|
||||
template <typename context_t, typename ...Ts>
|
||||
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, std::forward<Ts> (ds)...); }
|
||||
|
||||
bool subset (hb_subset_context_t *c) const
|
||||
{ return Lookup::subset<SubTable> (c); }
|
||||
|
|
|
@ -290,8 +290,8 @@ struct SingleSubst
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -524,7 +524,7 @@ struct MultipleSubst
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -767,7 +767,7 @@ struct AlternateSubst
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -1152,7 +1152,7 @@ struct LigatureSubst
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -1395,7 +1395,7 @@ struct ReverseChainSingleSubst
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -1434,14 +1434,14 @@ struct SubstLookupSubTable
|
|||
{
|
||||
TRACE_DISPATCH (this, lookup_type);
|
||||
switch (lookup_type) {
|
||||
case Single: return_trace (u.single.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Multiple: return_trace (u.multiple.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Alternate: return_trace (u.alternate.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Ligature: return_trace (u.ligature.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Context: return_trace (u.context.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case ChainContext: return_trace (u.chainContext.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Extension: return_trace (u.extension.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case ReverseChainSingle: return_trace (u.reverseChainContextSingle.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case Single: return_trace (u.single.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Multiple: return_trace (u.multiple.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Alternate: return_trace (u.alternate.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Ligature: return_trace (u.ligature.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Context: return_trace (u.context.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case ChainContext: return_trace (u.chainContext.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case Extension: return_trace (u.extension.dispatch (c, std::forward<Ts> (ds)...));
|
||||
case ReverseChainSingle: return_trace (u.reverseChainContextSingle.dispatch (c, std::forward<Ts> (ds)...));
|
||||
default: return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -1667,7 +1667,7 @@ struct SubstLookup : Lookup
|
|||
|
||||
template <typename context_t, typename ...Ts>
|
||||
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, std::forward<Ts> (ds)...); }
|
||||
|
||||
bool subset (hb_subset_context_t *c) const
|
||||
{ return Lookup::subset<SubTable> (c); }
|
||||
|
|
|
@ -2288,9 +2288,9 @@ struct Context
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.format3, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -3358,9 +3358,9 @@ struct ChainContext
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.format3, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||
case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
@ -3389,7 +3389,7 @@ struct ExtensionFormat1
|
|||
{
|
||||
TRACE_DISPATCH (this, format);
|
||||
if (unlikely (!c->may_dispatch (this, this))) return_trace (c->no_dispatch_return_value ());
|
||||
return_trace (get_subtable<typename T::SubTable> ().dispatch (c, get_type (), hb_forward<Ts> (ds)...));
|
||||
return_trace (get_subtable<typename T::SubTable> ().dispatch (c, get_type (), std::forward<Ts> (ds)...));
|
||||
}
|
||||
|
||||
void collect_variation_indices (hb_collect_variation_indices_context_t *c) const
|
||||
|
@ -3469,7 +3469,7 @@ struct Extension
|
|||
TRACE_DISPATCH (this, u.format);
|
||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||
switch (u.format) {
|
||||
case 1: return_trace (u.format1.dispatch (c, hb_forward<Ts> (ds)...));
|
||||
case 1: return_trace (u.format1.dispatch (c, std::forward<Ts> (ds)...));
|
||||
default:return_trace (c->default_return_value ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2011,14 +2011,14 @@ struct hb_get_glyph_alternates_dispatch_t :
|
|||
private:
|
||||
template <typename T, typename ...Ts> auto
|
||||
_dispatch (const T &obj, hb_priority<1>, Ts&&... ds) HB_AUTO_RETURN
|
||||
( obj.get_glyph_alternates (hb_forward<Ts> (ds)...) )
|
||||
( obj.get_glyph_alternates (std::forward<Ts> (ds)...) )
|
||||
template <typename T, typename ...Ts> auto
|
||||
_dispatch (const T &obj, hb_priority<0>, Ts&&... ds) HB_AUTO_RETURN
|
||||
( default_return_value () )
|
||||
public:
|
||||
template <typename T, typename ...Ts> auto
|
||||
dispatch (const T &obj, Ts&&... ds) HB_AUTO_RETURN
|
||||
( _dispatch (obj, hb_prioritize, hb_forward<Ts> (ds)...) )
|
||||
( _dispatch (obj, hb_prioritize, std::forward<Ts> (ds)...) )
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -145,14 +145,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
|
||||
( obj.sanitize (this, hb_forward<Ts> (ds)...) )
|
||||
( obj.sanitize (this, std::forward<Ts> (ds)...) )
|
||||
template <typename T, typename ...Ts> auto
|
||||
_dispatch (const T &obj, hb_priority<0>, Ts&&... ds) HB_AUTO_RETURN
|
||||
( obj.dispatch (this, hb_forward<Ts> (ds)...) )
|
||||
( obj.dispatch (this, std::forward<Ts> (ds)...) )
|
||||
public:
|
||||
template <typename T, typename ...Ts> auto
|
||||
dispatch (const T &obj, Ts&&... ds) HB_AUTO_RETURN
|
||||
( _dispatch (obj, hb_prioritize, hb_forward<Ts> (ds)...) )
|
||||
( _dispatch (obj, hb_prioritize, std::forward<Ts> (ds)...) )
|
||||
|
||||
|
||||
void init (hb_blob_t *b)
|
||||
|
|
|
@ -189,8 +189,8 @@ struct hb_serialize_context_t
|
|||
{ return check_success (!hb_deref (obj).in_error ()); }
|
||||
|
||||
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)...); }
|
||||
{ return propagate_error (std::forward<T1> (o1)) &&
|
||||
propagate_error (std::forward<Ts> (os)...); }
|
||||
|
||||
/* To be called around main operation. */
|
||||
template <typename Type>
|
||||
|
@ -494,7 +494,7 @@ struct hb_serialize_context_t
|
|||
|
||||
template <typename Type, typename ...Ts> auto
|
||||
_copy (const Type &src, hb_priority<1>, Ts&&... ds) HB_RETURN
|
||||
(Type *, src.copy (this, hb_forward<Ts> (ds)...))
|
||||
(Type *, src.copy (this, std::forward<Ts> (ds)...))
|
||||
|
||||
template <typename Type> auto
|
||||
_copy (const Type &src, hb_priority<0>) -> decltype (&(hb_declval<Type> () = src))
|
||||
|
@ -509,16 +509,16 @@ struct hb_serialize_context_t
|
|||
* instead of memcpy(). */
|
||||
template <typename Type, typename ...Ts>
|
||||
Type *copy (const Type &src, Ts&&... ds)
|
||||
{ return _copy (src, hb_prioritize, hb_forward<Ts> (ds)...); }
|
||||
{ return _copy (src, hb_prioritize, std::forward<Ts> (ds)...); }
|
||||
template <typename Type, typename ...Ts>
|
||||
Type *copy (const Type *src, Ts&&... ds)
|
||||
{ return copy (*src, hb_forward<Ts> (ds)...); }
|
||||
{ return copy (*src, std::forward<Ts> (ds)...); }
|
||||
|
||||
template<typename Iterator,
|
||||
hb_requires (hb_is_iterator (Iterator)),
|
||||
typename ...Ts>
|
||||
void copy_all (Iterator it, Ts&&... ds)
|
||||
{ for (decltype (*it) _ : it) copy (_, hb_forward<Ts> (ds)...); }
|
||||
{ for (decltype (*it) _ : it) copy (_, std::forward<Ts> (ds)...); }
|
||||
|
||||
template <typename Type>
|
||||
hb_serialize_context_t& operator << (const Type &obj) & { embed (obj); return *this; }
|
||||
|
@ -546,10 +546,10 @@ struct hb_serialize_context_t
|
|||
|
||||
template <typename Type, typename ...Ts>
|
||||
Type *extend (Type *obj, Ts&&... ds)
|
||||
{ return extend_size (obj, obj->get_size (hb_forward<Ts> (ds)...)); }
|
||||
{ return extend_size (obj, obj->get_size (std::forward<Ts> (ds)...)); }
|
||||
template <typename Type, typename ...Ts>
|
||||
Type *extend (Type &obj, Ts&&... ds)
|
||||
{ return extend (hb_addressof (obj), hb_forward<Ts> (ds)...); }
|
||||
{ return extend (hb_addressof (obj), std::forward<Ts> (ds)...); }
|
||||
|
||||
/* Output routines. */
|
||||
hb_bytes_t copy_bytes () const
|
||||
|
|
|
@ -45,14 +45,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
|
||||
( obj.subset (this, hb_forward<Ts> (ds)...) )
|
||||
( obj.subset (this, std::forward<Ts> (ds)...) )
|
||||
template <typename T, typename ...Ts> auto
|
||||
_dispatch (const T &obj, hb_priority<0>, Ts&&... ds) HB_AUTO_RETURN
|
||||
( obj.dispatch (this, hb_forward<Ts> (ds)...) )
|
||||
( obj.dispatch (this, std::forward<Ts> (ds)...) )
|
||||
public:
|
||||
template <typename T, typename ...Ts> auto
|
||||
dispatch (const T &obj, Ts&&... ds) HB_AUTO_RETURN
|
||||
( _dispatch (obj, hb_prioritize, hb_forward<Ts> (ds)...) )
|
||||
( _dispatch (obj, hb_prioritize, std::forward<Ts> (ds)...) )
|
||||
|
||||
hb_blob_t *source_blob;
|
||||
hb_subset_plan_t *plan;
|
||||
|
|
|
@ -150,7 +150,7 @@ struct hb_vector_t
|
|||
|
||||
/* Sink interface. */
|
||||
template <typename T>
|
||||
hb_vector_t& operator << (T&& v) { push (hb_forward<T> (v)); return *this; }
|
||||
hb_vector_t& operator << (T&& v) { push (std::forward<T> (v)); return *this; }
|
||||
|
||||
hb_array_t< Type> as_array () { return hb_array (arrayZ, length); }
|
||||
hb_array_t<const Type> as_array () const { return hb_array (arrayZ, length); }
|
||||
|
@ -198,7 +198,7 @@ struct hb_vector_t
|
|||
// the created copy to leak memory since we won't have stored a
|
||||
// reference to it.
|
||||
return p;
|
||||
*p = hb_forward<T> (v);
|
||||
*p = std::forward<T> (v);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue