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

@ -667,7 +667,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
void
print_type_fixed_point (struct type *type, struct ui_file *stream)
{
std::string small_img = fixed_point_scaling_factor (type).str ();
std::string small_img = type->fixed_point_scaling_factor ().str ();
fprintf_filtered (stream, "%s-byte fixed point (small = %s)",
pulongest (TYPE_LENGTH (type)), small_img.c_str ());