lib, plugins: use bt_field_class_type_is() where suitable
[babeltrace.git] / src / plugins / ctf / fs-sink / fs-sink-ctf-meta.h
index 81a74ffd5d0b334b2c448d3e8744df13a644ddd2..d6db67d9cbc46ecf2a835224d0a168aa5ee6af0a 100644 (file)
@@ -221,8 +221,8 @@ void _fs_sink_ctf_field_class_int_init(struct fs_sink_ctf_field_class_int *fc,
                (unsigned int) bt_field_class_integer_get_field_value_range(
                        ir_fc),
                index_in_parent);
-       fc->is_signed = (ir_fc_type == BT_FIELD_CLASS_TYPE_SIGNED_INTEGER ||
-               ir_fc_type == BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION);
+       fc->is_signed = bt_field_class_type_is(ir_fc_type,
+               BT_FIELD_CLASS_TYPE_SIGNED_INTEGER);
 }
 
 static inline
@@ -308,7 +308,8 @@ struct fs_sink_ctf_field_class_float *fs_sink_ctf_field_class_float_create(
        _fs_sink_ctf_field_class_bit_array_init((void *) fc,
                FS_SINK_CTF_FIELD_CLASS_TYPE_FLOAT,
                ir_fc,
-               bt_field_class_get_type(ir_fc) == BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL ? 32 : 64,
+               bt_field_class_get_type(ir_fc) ==
+                       BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL ? 32 : 64,
                index_in_parent);
        return fc;
 }
@@ -377,7 +378,7 @@ struct fs_sink_ctf_field_class_variant *fs_sink_ctf_field_class_variant_create_e
        BT_ASSERT(fc->tag_ref);
        fc->tag_is_before =
                bt_field_class_get_type(fc->base.ir_fc) ==
-               BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR;
+               BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD;
        return fc;
 }
 
@@ -410,8 +411,8 @@ struct fs_sink_ctf_field_class_sequence *fs_sink_ctf_field_class_sequence_create
        fc->length_ref = g_string_new(NULL);
        BT_ASSERT(fc->length_ref);
        fc->length_is_before =
-               bt_field_class_array_dynamic_borrow_length_field_path_const(ir_fc) ==
-               NULL;
+               bt_field_class_get_type(ir_fc) ==
+                       BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD;
        return fc;
 }
 
This page took 0.028117 seconds and 4 git commands to generate.