mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-05 21:45:06 +00:00
[meta] Return reference from reference-wrapper
This commit is contained in:
parent
c7493efeaf
commit
de729ec105
2 changed files with 7 additions and 7 deletions
|
@ -393,7 +393,7 @@ struct hb_map_iter_t :
|
|||
|
||||
private:
|
||||
Iter it;
|
||||
hb_reference_wrapper<Proj> f;
|
||||
mutable hb_reference_wrapper<Proj> f;
|
||||
};
|
||||
|
||||
template <typename Proj, hb_function_sortedness_t Sorted>
|
||||
|
@ -456,8 +456,8 @@ struct hb_filter_iter_t :
|
|||
|
||||
private:
|
||||
Iter it;
|
||||
hb_reference_wrapper<Pred> p;
|
||||
hb_reference_wrapper<Proj> f;
|
||||
mutable hb_reference_wrapper<Pred> p;
|
||||
mutable hb_reference_wrapper<Proj> f;
|
||||
};
|
||||
template <typename Pred, typename Proj>
|
||||
struct hb_filter_iter_factory_t
|
||||
|
|
|
@ -153,8 +153,8 @@ struct hb_reference_wrapper
|
|||
hb_reference_wrapper (T v) : v (v) {}
|
||||
bool operator == (const hb_reference_wrapper& o) const { return v == o.v; }
|
||||
bool operator != (const hb_reference_wrapper& o) const { return v != o.v; }
|
||||
operator T () const { return v; }
|
||||
T get () const { return v; }
|
||||
operator T& () { return v; }
|
||||
T& get () { return v; }
|
||||
T v;
|
||||
};
|
||||
template <typename T>
|
||||
|
@ -163,8 +163,8 @@ struct hb_reference_wrapper<T&>
|
|||
hb_reference_wrapper (T& v) : v (std::addressof (v)) {}
|
||||
bool operator == (const hb_reference_wrapper& o) const { return v == o.v; }
|
||||
bool operator != (const hb_reference_wrapper& o) const { return v != o.v; }
|
||||
operator T& () const { return *v; }
|
||||
T& get () const { return *v; }
|
||||
operator T& () { return *v; }
|
||||
T& get () { return *v; }
|
||||
T* v;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue