[pango/harfbuzz-ng] [HB] More cleanup
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Subject: [pango/harfbuzz-ng] [HB] More cleanup
- Date: Mon, 25 May 2009 04:28:16 -0400 (EDT)
commit 40c6f897dbdc4020c5aec07b7022caadb45cf3f1
Author: Behdad Esfahbod <behdad behdad org>
Date: Mon May 25 03:10:06 2009 -0400
[HB] More cleanup
---
pango/opentype/hb-ot-layout-common-private.h | 4 ++--
pango/opentype/hb-ot-layout-open-private.h | 9 +++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/pango/opentype/hb-ot-layout-common-private.h b/pango/opentype/hb-ot-layout-common-private.h
index d1045ec..0a755bc 100644
--- a/pango/opentype/hb-ot-layout-common-private.h
+++ b/pango/opentype/hb-ot-layout-common-private.h
@@ -82,7 +82,7 @@ struct LangSys
inline const unsigned int get_feature_index (unsigned int i) const { return featureIndex[i]; }
inline unsigned int get_feature_count (void) const { return featureIndex.len; }
- inline const bool has_required_feature (void) const { return reqFeatureIndex != 0xffff; }
+ inline bool has_required_feature (void) const { return reqFeatureIndex != 0xffff; }
inline int get_required_feature_index (void) const
{
if (reqFeatureIndex == 0xffff)
@@ -114,7 +114,7 @@ struct Script
// LONGTERMTODO bsearch
DEFINE_TAG_FIND_INTERFACE (LangSys, lang_sys); /* find_lang_sys_index (), get_lang_sys_by_tag (tag) */
- inline const bool has_default_lang_sys (void) const { return defaultLangSys != 0; }
+ inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; }
inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; }
private:
diff --git a/pango/opentype/hb-ot-layout-open-private.h b/pango/opentype/hb-ot-layout-open-private.h
index 1d091c4..5f02c65 100644
--- a/pango/opentype/hb-ot-layout-open-private.h
+++ b/pango/opentype/hb-ot-layout-open-private.h
@@ -108,17 +108,17 @@
inline const Tag& get_##name##_tag (unsigned int i) const { return (this+name##List).get_tag (i); }
#define DEFINE_TAG_FIND_INTERFACE(Type, name) \
- inline bool find_##name##_index (hb_tag_t tag, unsigned int *name##_index) const { \
+ inline bool find_##name##_index (hb_tag_t tag, unsigned int *index) const { \
const Tag t = tag; \
for (unsigned int i = 0; i < get_##name##_count (); i++) \
{ \
if (t == get_##name##_tag (i)) \
{ \
- if (name##_index) *name##_index = i; \
+ if (index) *index = i; \
return true; \
} \
} \
- if (name##_index) *name##_index = NO_INDEX; \
+ if (index) *index = NO_INDEX; \
return false; \
} \
inline const Type& get_##name##_by_tag (hb_tag_t tag) const \
@@ -150,10 +150,11 @@ struct Null
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
#define DEFINE_NULL_DATA(Type, size, data) \
+static const char _Null##Type[size] = data; \
template <> \
struct Null <Type> \
{ \
- static inline const Type &get () { static const char bytes[size] = data; return (const Type&) *bytes; /* XXX */ } \
+ static inline const Type &get () { return (const Type&) *_Null##Type; } \
}
/* Accessor macro. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]