提交 84c18658 编写于 作者: B Behdad Esfahbod

[arrays] Reduce Supplier<> even further

上级 1bcc4fc9
......@@ -231,28 +231,10 @@ inline hb_sorted_array_t<T> hb_sorted_array (T *array, unsigned int len)
typedef hb_array_t<const char> hb_bytes_t;
/*
* Supplier
*/
template <typename Type>
struct Supplier : hb_array_t<const Type>
template <typename Type> struct Supplier : hb_array_t<const Type>
{
Supplier (const Type *array, unsigned int len_)
{
this->arrayZ = array;
this->len = len_;
}
Supplier (hb_array_t<const Type> v)
{
this->arrayZ = v.arrayZ;
this->len = v.len;
}
private:
Supplier (const Supplier<Type> &); /* Disallow copy */
Supplier<Type>& operator= (const Supplier<Type> &); /* Disallow copy */
Supplier (const Type *array, unsigned int len) : hb_array_t<const Type> (array, len) {}
Supplier (hb_array_t<const Type> v) : hb_array_t<const Type> (v) {}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册