This commit is contained in:
Behdad Esfahbod 2010-10-01 18:58:50 -04:00
parent 2841436926
commit 7f97d2cd90
4 changed files with 15 additions and 15 deletions

View File

@ -126,7 +126,7 @@ static const void *_NullPool[64 / sizeof (void *)];
/* Generic nul-content Null objects. */
template <typename Type>
static inline const Type& Null () {
static inline const Type& Null (void) {
ASSERT_STATIC (Type::min_size <= sizeof (_NullPool));
return *CastP<Type> (_NullPool);
}
@ -135,7 +135,7 @@ static inline const Type& Null () {
#define DEFINE_NULL_DATA(Type, data) \
static const char _Null##Type[Type::min_size + 1] = data; /* +1 is for nul-termination in data */ \
template <> \
inline const Type& Null<Type> () { \
inline const Type& Null<Type> (void) { \
return *CastP<Type> (_Null##Type); \
} /* The following line really exists such that we end in a place needing semicolon */ \
ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
@ -373,7 +373,7 @@ class BEInt<Type, 2>
{
public:
inline void set (Type i) { hb_be_uint16_put (v,i); }
inline operator Type () const { return hb_be_uint16_get (v); }
inline operator Type (void) const { return hb_be_uint16_get (v); }
inline bool operator == (const BEInt<Type, 2>& o) const { return hb_be_uint16_cmp (v, o.v); }
inline bool operator != (const BEInt<Type, 2>& o) const { return !(*this == o); }
private: uint8_t v[2];
@ -383,7 +383,7 @@ class BEInt<Type, 4>
{
public:
inline void set (Type i) { hb_be_uint32_put (v,i); }
inline operator Type () const { return hb_be_uint32_get (v); }
inline operator Type (void) const { return hb_be_uint32_get (v); }
inline bool operator == (const BEInt<Type, 4>& o) const { return hb_be_uint32_cmp (v, o.v); }
inline bool operator != (const BEInt<Type, 4>& o) const { return !(*this == o); }
private: uint8_t v[4];
@ -571,7 +571,7 @@ struct GenericArrayOf
if (unlikely (i >= len)) return Null(Type);
return array[i];
}
inline unsigned int get_size () const
inline unsigned int get_size (void) const
{ return len.static_size + len * Type::static_size; }
inline bool sanitize (hb_sanitize_context_t *c) {
@ -677,7 +677,7 @@ struct HeadlessArrayOf
if (unlikely (i >= len || !i)) return Null(Type);
return array[i-1];
}
inline unsigned int get_size () const
inline unsigned int get_size (void) const
{ return len.static_size + (len ? len - 1 : 0) * Type::static_size; }
inline bool sanitize_shallow (hb_sanitize_context_t *c) {

View File

@ -566,7 +566,7 @@ struct Device
return delta;
}
inline unsigned int get_size () const
inline unsigned int get_size (void) const
{
unsigned int f = deltaFormat;
if (unlikely (f < 1 || f > 3 || startSize > endSize)) return 3 * USHORT::static_size;

View File

@ -333,22 +333,22 @@ struct GDEF
ComponentGlyph = 4
};
inline bool has_glyph_classes () const { return glyphClassDef != 0; }
inline bool has_glyph_classes (void) const { return glyphClassDef != 0; }
inline hb_ot_layout_class_t get_glyph_class (hb_codepoint_t glyph) const
{ return (this+glyphClassDef).get_class (glyph); }
inline bool has_mark_attachment_types () const { return markAttachClassDef != 0; }
inline bool has_mark_attachment_types (void) const { return markAttachClassDef != 0; }
inline hb_ot_layout_class_t get_mark_attachment_type (hb_codepoint_t glyph) const
{ return (this+markAttachClassDef).get_class (glyph); }
inline bool has_attach_points () const { return attachList != 0; }
inline bool has_attach_points (void) const { return attachList != 0; }
inline unsigned int get_attach_points (hb_codepoint_t glyph_id,
unsigned int start_offset,
unsigned int *point_count /* IN/OUT */,
unsigned int *point_array /* OUT */) const
{ return (this+attachList).get_attach_points (glyph_id, start_offset, point_count, point_array); }
inline bool has_lig_carets () const { return ligCaretList != 0; }
inline bool has_lig_carets (void) const { return ligCaretList != 0; }
inline unsigned int get_lig_carets (hb_ot_layout_context_t *c,
hb_codepoint_t glyph_id,
unsigned int start_offset,
@ -356,7 +356,7 @@ struct GDEF
int *caret_array /* OUT */) const
{ return (this+ligCaretList).get_lig_carets (c, glyph_id, start_offset, caret_count, caret_array); }
inline bool has_mark_sets () const { return version >= 0x00010002 && markGlyphSetsDef[0] != 0; }
inline bool has_mark_sets (void) const { return version >= 0x00010002 && markGlyphSetsDef[0] != 0; }
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); }

View File

@ -84,9 +84,9 @@ struct ValueFormat : USHORT
* PosTable (may be NULL) */
#endif
inline unsigned int get_len () const
inline unsigned int get_len (void) const
{ return _hb_popcount32 ((unsigned int) *this); }
inline unsigned int get_size () const
inline unsigned int get_size (void) const
{ return get_len () * Value::static_size; }
void apply_value (hb_ot_layout_context_t *layout,
@ -154,7 +154,7 @@ struct ValueFormat : USHORT
public:
inline bool has_device () const {
inline bool has_device (void) const {
unsigned int format = *this;
return (format & devices) != 0;
}