Newer compilers / language allows structs with constructor in union.
So, this was not actually testing anything. Indeed, the recent
change in DISALLOW_COPY *is* making some of our types non-POD.
That broke some bots.
Just remove this since it wasn't doing much, and I'd rather have
DISALLOW_COPY.
public:
hb_object_header_t header;
- ASSERT_POD ();
bool immutable;
struct hb_buffer_t
{
hb_object_header_t header;
- ASSERT_POD ();
/* Information about how the text in the buffer should be treated */
hb_unicode_funcs_t *unicode; /* Unicode functions */
struct hb_face_t
{
hb_object_header_t header;
- ASSERT_POD ();
hb_bool_t immutable;
struct hb_font_funcs_t
{
hb_object_header_t header;
- ASSERT_POD ();
hb_bool_t immutable;
struct hb_font_t
{
hb_object_header_t header;
- ASSERT_POD ();
hb_bool_t immutable;
/* Check _assertion in a method environment */
#define _DEFINE_INSTANCE_ASSERTION1(_line, _assertion) \
inline void _instance_assertion_on_line_##_line (void) const \
- { \
- static_assert ((_assertion), ""); \
- ASSERT_INSTANCE_POD (*this); /* Make sure it's POD. */ \
- }
+ { static_assert ((_assertion), ""); }
# define _DEFINE_INSTANCE_ASSERTION0(_line, _assertion) _DEFINE_INSTANCE_ASSERTION1 (_line, _assertion)
# define DEFINE_INSTANCE_ASSERTION(_assertion) _DEFINE_INSTANCE_ASSERTION0 (__LINE__, _assertion)
{
hb_reference_count_t ref_count;
hb_atomic_ptr_t<hb_user_data_array_t> user_data;
-
-#define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INIT, HB_ATOMIC_PTR_INIT (nullptr)}
-
- private:
- ASSERT_POD ();
};
+#define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INIT, HB_ATOMIC_PTR_INIT (nullptr)}
/*
struct arabic_fallback_plan_t
{
- ASSERT_POD ();
-
unsigned int num_lookups;
bool free_lookups;
struct arabic_shape_plan_t
{
- ASSERT_POD ();
-
/* The "+ 1" in the next array is to accommodate for the "NONE" command,
* which is not an OpenType feature, but this simplifies the code by not
* having to do a "if (... < NONE) ..." and just rely on the fact that
struct hangul_shape_plan_t
{
- ASSERT_POD ();
-
hb_mask_t mask_array[HANGUL_FEATURE_COUNT];
};
struct indic_shape_plan_t
{
- ASSERT_POD ();
-
inline bool load_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const
{
hb_codepoint_t glyph = virama_glyph.get_relaxed ();
struct khmer_shape_plan_t
{
- ASSERT_POD ();
-
inline bool get_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const
{
hb_codepoint_t glyph = virama_glyph;
struct use_shape_plan_t
{
- ASSERT_POD ();
-
hb_mask_t rphf_mask;
arabic_shape_plan_t *arabic_plan;
template <typename mask_t, unsigned int shift>
struct hb_set_digest_lowest_bits_t
{
- ASSERT_POD ();
-
enum { mask_bytes = sizeof (mask_t) };
enum { mask_bits = sizeof (mask_t) * 8 };
static const unsigned int num_bits = 0
template <typename head_t, typename tail_t>
struct hb_set_digest_combiner_t
{
- ASSERT_POD ();
-
inline void init (void) {
head.init ();
tail.init ();
struct hb_shape_plan_t
{
hb_object_header_t header;
- ASSERT_POD ();
hb_bool_t default_shaper_list;
hb_face_t *face_unsafe; /* We don't carry a reference to face. */
struct hb_subset_input_t
{
hb_object_header_t header;
- ASSERT_POD ();
hb_set_t *unicodes;
hb_set_t *glyphs;
struct hb_subset_plan_t
{
hb_object_header_t header;
- ASSERT_POD ();
bool drop_hints : 1;
bool drop_layout : 1;
struct hb_unicode_funcs_t
{
hb_object_header_t header;
- ASSERT_POD ();
hb_unicode_funcs_t *parent;
static_assert ((sizeof (hb_var_int_t) == 4), "");
-/* We like our types POD */
-
-#define _ASSERT_TYPE_POD1(_line, _type) union _type_##_type##_on_line_##_line##_is_not_POD { _type instance; }
-#define _ASSERT_TYPE_POD0(_line, _type) _ASSERT_TYPE_POD1 (_line, _type)
-#define ASSERT_TYPE_POD(_type) _ASSERT_TYPE_POD0 (__LINE__, _type)
-
-#ifdef __GNUC__
-# define _ASSERT_INSTANCE_POD1(_line, _instance) \
- HB_STMT_START { \
- typedef __typeof__(_instance) _type_##_line; \
- _ASSERT_TYPE_POD1 (_line, _type_##_line); \
- } HB_STMT_END
-#else
-# define _ASSERT_INSTANCE_POD1(_line, _instance) typedef int _assertion_on_line_##_line##_not_tested
-#endif
-# define _ASSERT_INSTANCE_POD0(_line, _instance) _ASSERT_INSTANCE_POD1 (_line, _instance)
-# define ASSERT_INSTANCE_POD(_instance) _ASSERT_INSTANCE_POD0 (__LINE__, _instance)
-
-/* Check _assertion in a method environment */
-#define _ASSERT_POD1(_line) \
- HB_UNUSED inline void _static_assertion_on_line_##_line (void) const \
- { _ASSERT_INSTANCE_POD1 (_line, *this); /* Make sure it's POD. */ }
-# define _ASSERT_POD0(_line) _ASSERT_POD1 (_line)
-# define ASSERT_POD() _ASSERT_POD0 (__LINE__)
-
-
#define HB_DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)