From 166ae8b0aa3b1e7298a1bbb872647cb352a0f924 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 29 Oct 2018 22:40:37 -0700 Subject: [PATCH] Remove now unused hb_auto_t<> --- src/hb-dsalgs.hh | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index 837bb86bf..e8bd95c27 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -511,26 +511,6 @@ hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *o } -template -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 explicit hb_auto_t (T1 *t1) { Type::init (t1); } - template 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) {}