Remove hb_assign()

Not needed anymore.  We just use operator= now.
This commit is contained in:
Behdad Esfahbod 2019-03-29 20:23:07 -07:00
parent b986c6a321
commit 4c38a9f601
4 changed files with 3 additions and 16 deletions

View File

@ -544,7 +544,7 @@ inline void
hb_fill (C& c, const V &v)
{
for (auto i = hb_iter (c); i; i++)
hb_assign (*i, v);
*i = v;
}
template <typename S, typename D,

View File

@ -405,7 +405,7 @@ struct hb_sanitize_context_t :
{
if (this->may_edit (obj, hb_static_size (Type)))
{
hb_assign (* const_cast<Type *> (obj), v);
* const_cast<Type *> (obj) = v;
return true;
}
return false;

View File

@ -76,19 +76,6 @@ struct hb_static_size
#define hb_static_size(T) hb_static_size<T>::value
/* hb_assign (obj, value)
* Calls obj.set (value) if obj.min_size is defined and value has different type
* from obj, or obj = v otherwise. */
template <typename T, typename V, typename B>
struct _hb_assign
{ static inline void value (T &o, const V v) { o = v; } };
template <typename T, typename V>
static inline void hb_assign (T &o, const V v)
{ _hb_assign<T, V, hb_true_t>::value (o, v); }
/*
* Null()
*/

View File

@ -584,7 +584,7 @@ struct ArrayOf
/* TODO Umm. Just exhaust the iterator instead? Being extra
* cautious right now.. */
for (unsigned i = 0; i < count; i++, items++)
hb_assign (arrayZ[i], *items);
arrayZ[i] = *items;
return_trace (true);
}