analyzer/text-art: fix clang warnings [PR110433,PR110612]
gcc/analyzer/ChangeLog: PR analyzer/110433 PR middle-end/110612 * access-diagram.cc (class spatial_item): Add virtual dtor. gcc/ChangeLog: PR middle-end/110612 * text-art/table.cc (table_geometry::table_geometry): Drop m_table field. (table_geometry::table_x_to_canvas_x): Add cast to comparison. (table_geometry::table_y_to_canvas_y): Likewise. * text-art/table.h (table_geometry::m_table): Drop unused field. * text-art/widget.h (wrapper_widget::update_child_alloc_rects): Add "override". Signed-off-by: David Malcolm <dmalcolm@redhat.com>
This commit is contained in:
parent
5a0aff76a9
commit
7006f02bbc
4 changed files with 5 additions and 6 deletions
|
@ -1125,6 +1125,7 @@ private:
|
|||
class spatial_item
|
||||
{
|
||||
public:
|
||||
virtual ~spatial_item () {}
|
||||
virtual void add_boundaries (boundaries &out, logger *) const = 0;
|
||||
|
||||
virtual table make_table (const bit_to_table_map &btm,
|
||||
|
|
|
@ -507,8 +507,7 @@ table_cell_sizes::get_canvas_size (const table::rect_t &rect) const
|
|||
/* class text_art::table_geometry. */
|
||||
|
||||
table_geometry::table_geometry (const table &table, table_cell_sizes &cell_sizes)
|
||||
: m_table (table),
|
||||
m_cell_sizes (cell_sizes),
|
||||
: m_cell_sizes (cell_sizes),
|
||||
m_canvas_size (canvas::size_t (0, 0)),
|
||||
m_col_start_x (table.get_size ().w),
|
||||
m_row_start_y (table.get_size ().h)
|
||||
|
@ -558,7 +557,7 @@ int
|
|||
table_geometry::table_x_to_canvas_x (int table_x) const
|
||||
{
|
||||
/* Allow one beyond the end, for the right-hand border of the table. */
|
||||
if (table_x == m_col_start_x.size ())
|
||||
if (table_x == (int)m_col_start_x.size ())
|
||||
return m_canvas_size.w - 1;
|
||||
return m_col_start_x[table_x];
|
||||
}
|
||||
|
@ -570,7 +569,7 @@ int
|
|||
table_geometry::table_y_to_canvas_y (int table_y) const
|
||||
{
|
||||
/* Allow one beyond the end, for the right-hand border of the table. */
|
||||
if (table_y == m_row_start_y.size ())
|
||||
if (table_y == (int)m_row_start_y.size ())
|
||||
return m_canvas_size.h - 1;
|
||||
return m_row_start_y[table_y];
|
||||
}
|
||||
|
|
|
@ -232,7 +232,6 @@ class table_geometry
|
|||
}
|
||||
|
||||
private:
|
||||
const table &m_table;
|
||||
table_cell_sizes &m_cell_sizes;
|
||||
canvas::size_t m_canvas_size;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ class wrapper_widget : public widget
|
|||
{
|
||||
return m_child->get_req_size ();
|
||||
}
|
||||
void update_child_alloc_rects ()
|
||||
void update_child_alloc_rects () override
|
||||
{
|
||||
m_child->set_alloc_rect (get_alloc_rect ());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue