提交 855720ca 编写于 作者: B Behdad Esfahbod

[HB] Remove more macros

上级 c968fc2d
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
#include "hb-ot-layout-common-private.h" #include "hb-ot-layout-common-private.h"
#define DEFINE_INDIRECT_GLYPH_ARRAY_LOOKUP(Type, array, name) \
inline const Type& name (hb_codepoint_t glyph) { return this+array[(this+coverage)(glyph)]; }
struct GlyphClassDef : ClassDef struct GlyphClassDef : ClassDef
{ {
enum { enum {
...@@ -55,10 +51,12 @@ ASSERT_SIZE (AttachPoint, 2); ...@@ -55,10 +51,12 @@ ASSERT_SIZE (AttachPoint, 2);
struct AttachList struct AttachList
{ {
/* XXX We need enumeration API here */ /* XXX We need enumeration API here */
/* const AttachPoint& get_attach_points (hb_codepoint_t glyph); */ inline const AttachPoint& get_attach_points (hb_codepoint_t glyph)
DEFINE_INDIRECT_GLYPH_ARRAY_LOOKUP (AttachPoint, attachPoint, get_attach_points); {
return this+attachPoint[(this+coverage) (glyph)];
}
private: private:
OffsetTo<Coverage> OffsetTo<Coverage>
coverage; /* Offset to Coverage table -- from coverage; /* Offset to Coverage table -- from
* beginning of AttachList table */ * beginning of AttachList table */
...@@ -166,8 +164,10 @@ struct LigCaretList ...@@ -166,8 +164,10 @@ struct LigCaretList
friend struct GDEF; friend struct GDEF;
private: private:
/* const LigGlyph& get_lig_glyph (hb_codepoint_t glyph); */ inline const LigGlyph& get_lig_glyph (hb_codepoint_t glyph)
DEFINE_INDIRECT_GLYPH_ARRAY_LOOKUP (LigGlyph, ligGlyph, get_lig_glyph); {
return this+ligGlyph[(this+coverage) (glyph)];
}
private: private:
OffsetTo<Coverage> OffsetTo<Coverage>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册