提交 166ae8b0 编写于 作者: B Behdad Esfahbod

Remove now unused hb_auto_t<>

上级 56e0fd34
......@@ -511,26 +511,6 @@ hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *o
}
template <typename Type>
struct hb_auto_t : Type
{
hb_auto_t (void) { Type::init (); }
/* Explicitly allow the following only for pointer and references,
* to avoid any accidental copies.
*
* Apparently if we template for all types, then gcc seems to
* capture a reference argument in the type, but clang doesn't,
* causing unwanted copies and bugs that come with it. Ideally
* we should use C++11-style rvalue reference &&t1. */
template <typename T1> explicit hb_auto_t (T1 *t1) { Type::init (t1); }
template <typename T1> explicit hb_auto_t (T1 &t1) { Type::init (t1); }
~hb_auto_t (void) { Type::fini (); }
private: /* Hide */
void init (void) {}
void fini (void) {}
};
struct hb_bytes_t
{
inline hb_bytes_t (void) : arrayZ (nullptr), len (0) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册