[HB] Put C++ inline's back
Apparetly in C++, inline means a totally different thing.
diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh
index 7d2ab20..4bf70ed 100644
--- a/src/hb-open-file-private.hh
+++ b/src/hb-open-file-private.hh
@@ -103,7 +103,7 @@
return get_table (table_index);
}
- unsigned int get_face_count (void) const { return 1; }
+ inline unsigned int get_face_count (void) const { return 1; }
public:
inline bool sanitize (SANITIZE_ARG_DEF, const void *base) {
@@ -136,14 +136,14 @@
STATIC_DEFINE_GET_FOR_DATA_CHECK_MAJOR_VERSION (TTCHeader, 1, 2);
- unsigned int get_face_count (void) const { return table.len; }
+ inline unsigned int get_face_count (void) const { return table.len; }
- const OpenTypeFontFace& get_face (unsigned int i) const
+ inline const OpenTypeFontFace& get_face (unsigned int i) const
{
return this+table[i];
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (version)) return false;
if (version.major < 1 || version.major > 2) return true;
@@ -175,7 +175,7 @@
STATIC_DEFINE_GET_FOR_DATA (OpenTypeFontFile);
- unsigned int get_face_count (void) const
+ inline unsigned int get_face_count (void) const
{
switch (tag) {
default: return 0;
@@ -183,7 +183,7 @@
case TTCTag: return TTCHeader::get_for_data (CONST_CHARP(this)).get_face_count ();
}
}
- const OpenTypeFontFace& get_face (unsigned int i) const
+ inline const OpenTypeFontFace& get_face (unsigned int i) const
{
switch (tag) {
default: return Null(OpenTypeFontFace);
@@ -202,7 +202,7 @@
return ((const char*) this) + table.offset;
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE_SELF ()) return false;
switch (tag) {
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index 7fd96a0..82e457b 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -424,21 +424,21 @@
return CONST_CAST(Type, *CONST_CHARP(base), offset);
}
- bool sanitize (SANITIZE_ARG_DEF, const void *base) {
+ inline bool sanitize (SANITIZE_ARG_DEF, const void *base) {
SANITIZE_DEBUG ();
if (!SANITIZE_OBJ (*this)) return false;
unsigned int offset = *this;
if (HB_UNLIKELY (!offset)) return true;
return SANITIZE (CAST(Type, *DECONST_CHARP(base), offset)) || NEUTER (DECONST_CAST(OffsetType,*this,0), 0);
}
- bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
+ inline bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
SANITIZE_DEBUG ();
if (!SANITIZE_OBJ (*this)) return false;
unsigned int offset = *this;
if (HB_UNLIKELY (!offset)) return true;
return SANITIZE_BASE (CAST(Type, *DECONST_CHARP(base), offset), base2) || NEUTER (DECONST_CAST(OffsetType,*this,0), 0);
}
- bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
+ inline bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
SANITIZE_DEBUG ();
if (!SANITIZE_OBJ (*this)) return false;
unsigned int offset = *this;
@@ -471,7 +471,7 @@
inline unsigned int get_size () const
{ return sizeof (len) + len * sizeof (array[0]); }
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
/* Note; for non-recursive types, this is not much needed
@@ -482,7 +482,7 @@
*/
return true;
}
- bool sanitize (SANITIZE_ARG_DEF, const void *base) {
+ inline bool sanitize (SANITIZE_ARG_DEF, const void *base) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
unsigned int count = len;
@@ -491,7 +491,7 @@
return false;
return true;
}
- bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
+ inline bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
unsigned int count = len;
@@ -500,7 +500,7 @@
return false;
return true;
}
- bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
+ inline bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
unsigned int count = len;
@@ -547,7 +547,7 @@
inline unsigned int get_size () const
{ return sizeof (len) + (len ? len - 1 : 0) * sizeof (array[0]); }
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
/* Note; for non-recursive types, this is not much needed
diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh
index a4032d9..588e21e 100644
--- a/src/hb-ot-layout-common-private.hh
+++ b/src/hb-ot-layout-common-private.hh
@@ -412,7 +412,7 @@
{
inline unsigned int operator() (hb_codepoint_t glyph_id) const { return get_coverage (glyph_id); }
- unsigned int get_coverage (hb_codepoint_t glyph_id) const
+ inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
{
switch (u.format) {
case 1: return u.format1->get_coverage(glyph_id);
@@ -421,7 +421,7 @@
}
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@@ -528,7 +528,7 @@
{
inline unsigned int operator() (hb_codepoint_t glyph_id) const { return get_class (glyph_id); }
- hb_ot_layout_class_t get_class (hb_codepoint_t glyph_id) const
+ inline hb_ot_layout_class_t get_class (hb_codepoint_t glyph_id) const
{
switch (u.format) {
case 1: return u.format1->get_class(glyph_id);
@@ -537,7 +537,7 @@
}
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@@ -565,7 +565,7 @@
{
inline int operator() (unsigned int ppem_size) const { return get_delta (ppem_size); }
- int get_delta (unsigned int ppem_size) const
+ inline int get_delta (unsigned int ppem_size) const
{
unsigned int f = deltaFormat;
if (HB_UNLIKELY (f < 1 || f > 3))
@@ -595,7 +595,7 @@
return sizeof (*this) + ((endSize - startSize + (1 << (4 - f)) - 1) >> (4 - f));
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
return SANITIZE_GET_SIZE ();
}
diff --git a/src/hb-ot-layout-gdef-private.hh b/src/hb-ot-layout-gdef-private.hh
index 0c18d14..1dce3c0 100644
--- a/src/hb-ot-layout-gdef-private.hh
+++ b/src/hb-ot-layout-gdef-private.hh
@@ -153,7 +153,7 @@
struct CaretValue
{
- int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id) const
+ inline int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id) const
{
switch (u.format) {
case 1: return u.format1->get_caret_value (context, glyph_id);
@@ -335,7 +335,7 @@
inline bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const
{ return version >= 0x00010002 && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); }
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (version)) return false;
if (version.major != 1) return true;
diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh
index 157294e..307f269 100644
--- a/src/hb-ot-layout-gpos-private.hh
+++ b/src/hb-ot-layout-gpos-private.hh
@@ -1366,7 +1366,7 @@
Extension = 9,
};
- bool apply (APPLY_ARG_DEF, unsigned int lookup_type) const
+ inline bool apply (APPLY_ARG_DEF, unsigned int lookup_type) const
{
switch (lookup_type) {
case Single: return u.single->apply (APPLY_ARG);
@@ -1382,7 +1382,7 @@
}
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@@ -1460,9 +1460,9 @@
return false;
}
- bool apply_string (hb_ot_layout_context_t *context,
- hb_buffer_t *buffer,
- hb_mask_t mask) const
+ inline bool apply_string (hb_ot_layout_context_t *context,
+ hb_buffer_t *buffer,
+ hb_mask_t mask) const
{
bool ret = false;
@@ -1527,7 +1527,7 @@
hb_mask_t mask) const
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!GSUBGPOS::sanitize (SANITIZE_ARG)) return false;
OffsetTo<PosLookupList> &list = CAST(OffsetTo<PosLookupList>, lookupList, 0);
diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh
index 7539bc2..50b6286 100644
--- a/src/hb-ot-layout-gsub-private.hh
+++ b/src/hb-ot-layout-gsub-private.hh
@@ -678,7 +678,7 @@
ReverseChainSingle = 8,
};
- bool apply (APPLY_ARG_DEF, unsigned int lookup_type) const
+ inline bool apply (APPLY_ARG_DEF, unsigned int lookup_type) const
{
switch (lookup_type) {
case Single: return u.single->apply (APPLY_ARG);
@@ -693,7 +693,7 @@
}
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@@ -773,9 +773,9 @@
return false;
}
- bool apply_string (hb_ot_layout_context_t *context,
- hb_buffer_t *buffer,
- hb_mask_t mask) const
+ inline bool apply_string (hb_ot_layout_context_t *context,
+ hb_buffer_t *buffer,
+ hb_mask_t mask) const
{
bool ret = false;
@@ -853,7 +853,7 @@
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!GSUBGPOS::sanitize (SANITIZE_ARG)) return false;
OffsetTo<SubstLookupList> &list = CAST(OffsetTo<SubstLookupList>, lookupList, 0);
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index c322dfb..559ee08 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -439,7 +439,7 @@
struct Context
{
protected:
- bool apply (APPLY_ARG_DEF, apply_lookup_func_t apply_func) const
+ inline bool apply (APPLY_ARG_DEF, apply_lookup_func_t apply_func) const
{
switch (u.format) {
case 1: return u.format1->apply (APPLY_ARG, apply_func);
@@ -449,7 +449,7 @@
}
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@@ -746,7 +746,7 @@
struct ChainContext
{
protected:
- bool apply (APPLY_ARG_DEF, apply_lookup_func_t apply_func) const
+ inline bool apply (APPLY_ARG_DEF, apply_lookup_func_t apply_func) const
{
switch (u.format) {
case 1: return u.format1->apply (APPLY_ARG, apply_func);
@@ -756,7 +756,7 @@
}
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@@ -826,7 +826,7 @@
}
}
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@@ -884,7 +884,7 @@
inline const Lookup& get_lookup (unsigned int i) const
{ return (this+lookupList)[i]; }
- bool sanitize (SANITIZE_ARG_DEF) {
+ inline bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (version)) return false;
if (version.major != 1) return true;