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

@ -4927,7 +4927,7 @@ static void
print_fixed_point_type_info (struct type *type, int spaces)
{
printfi_filtered (spaces + 2, "scaling factor: %s\n",
fixed_point_scaling_factor (type).str ().c_str ());
type->fixed_point_scaling_factor ().str ().c_str ());
}
static struct obstack dont_print_type_obstack;
@ -5881,9 +5881,9 @@ type::fixed_point_type_base_type ()
/* See gdbtypes.h. */
const gdb_mpq &
fixed_point_scaling_factor (struct type *type)
type::fixed_point_scaling_factor ()
{
type = type->fixed_point_type_base_type ();
struct type *type = this->fixed_point_type_base_type ();
return type->fixed_point_info ().scaling_factor;
}