[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Oct 30 05:40:57 UTC 2018


 src/hb-dsalgs.hh |   20 --------------------
 1 file changed, 20 deletions(-)

New commits:
commit 166ae8b0aa3b1e7298a1bbb872647cb352a0f924
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Oct 29 22:40:37 2018 -0700

    Remove now unused hb_auto_t<>

diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh
index 837bb86b..e8bd95c2 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 <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) {}


More information about the HarfBuzz mailing list