Make function fixed_point_scaling_factor a method of struct type

This logically connects this function to the object it inspects.

gdb/ChangeLog:

        * gdbtypes.h (struct type) <fixed_point_scaling_factor>: New method,
        replacing fixed_point_scaling_factor.  All callers updated
        throughout this project.
        (fixed_point_scaling_factor): Delete declaration.
        * gdbtypes.c (type::fixed_point_scaling_factor): Replaces
        fixed_point_scaling_factor.  Adjust implementation accordingly.
This commit is contained in:
Joel Brobecker 2020-11-23 21:49:13 -05:00
parent d19937a74c
commit e6fcee3a73
8 changed files with 26 additions and 15 deletions

View file

@ -911,11 +911,11 @@ fixed_point_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
v1.read_fixed_point (gdb::make_array_view (value_contents (arg1),
TYPE_LENGTH (type1)),
type_byte_order (type1), type1->is_unsigned (),
fixed_point_scaling_factor (type1));
type1->fixed_point_scaling_factor ());
v2.read_fixed_point (gdb::make_array_view (value_contents (arg2),
TYPE_LENGTH (type2)),
type_byte_order (type2), type2->is_unsigned (),
fixed_point_scaling_factor (type2));
type2->fixed_point_scaling_factor ());
#define INIT_VAL_WITH_FIXED_POINT_VAL(RESULT) \
do { \
@ -924,7 +924,7 @@ fixed_point_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
(gdb::make_array_view (value_contents_raw (val), \
TYPE_LENGTH (type1)), \
type_byte_order (type1), type1->is_unsigned (), \
fixed_point_scaling_factor (type1)); \
type1->fixed_point_scaling_factor ()); \
} while (0)
switch (op)