[HarfBuzz] harfbuzz: Branch 'master' - 2 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Aug 29 01:28:42 UTC 2018
src/hb-dsalgs.hh | 7 ++++---
src/hb-ot-layout.cc | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit fee0f41c6c1e50621d10b07802ca36a9b295b53d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Aug 28 18:27:41 2018 -0700
Don't declare extern symbols as inline
clang -O3 was completely removing _get_gdef(), causing link
failure when needed from another compilation unit. Surprisingly,
"extern inline" didn't fix it.
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 8b247704..34507891 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -56,7 +56,7 @@
// return *(data->base.get ());
// }
-inline const OT::GDEF& _get_gdef (hb_face_t *face)
+const OT::GDEF& _get_gdef (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GDEF);
return *hb_ot_face_data (face)->GDEF->table;
@@ -71,7 +71,7 @@ static inline const OT::GSUB& _get_gsub (hb_face_t *face)
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GSUB);
return *hb_ot_face_data (face)->GSUB->table;
}
-inline const OT::GSUB& _get_gsub_relaxed (hb_face_t *face)
+const OT::GSUB& _get_gsub_relaxed (hb_face_t *face)
{
return *hb_ot_face_data (face)->GSUB.get_relaxed ()->table;
}
@@ -85,7 +85,7 @@ static inline const OT::GPOS& _get_gpos (hb_face_t *face)
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GPOS);
return *hb_ot_face_data (face)->GPOS->table;
}
-inline const OT::GPOS& _get_gpos_relaxed (hb_face_t *face)
+const OT::GPOS& _get_gpos_relaxed (hb_face_t *face)
{
return *hb_ot_face_data (face)->GPOS.get_relaxed ()->table;
}
commit 967741e4c468ebf0a40f91934ed1923506099806
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Aug 28 18:18:02 2018 -0700
Add explicit to hb_auto_t 1param constructors
diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh
index 8c910748..7e06ff17 100644
--- a/src/hb-dsalgs.hh
+++ b/src/hb-dsalgs.hh
@@ -497,9 +497,10 @@ struct hb_auto_t : Type
*
* 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. */
- template <typename T1> hb_auto_t (T1 *t1) { Type::init (t1); }
- template <typename T1> hb_auto_t (T1 &t1) { Type::init (t1); }
+ * 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) {}
More information about the HarfBuzz
mailing list