From e6fcee3a73ddab55e3b35b7705b01035383e5417 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Mon, 23 Nov 2020 21:49:13 -0500 Subject: 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) : 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. --- gdb/valarith.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/valarith.c') diff --git a/gdb/valarith.c b/gdb/valarith.c index 7ab183c..29ac46b 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -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) -- cgit v1.1