commit | d7789889b1839c3c0f64c6738b0d8517ccead049 | [log] [tgz] |
---|---|---|
author | Simon Marchi <simon.marchi@efficios.com> | Tue Jan 31 10:57:20 2023 -0500 |
committer | Simon Marchi <simon.marchi@efficios.com> | Tue Jan 31 12:36:46 2023 -0500 |
tree | 8b3f227cfb4a51ad30a8480c958c826ebf0d0a27 | |
parent | 95cbab2bebf7e810eded3e16ae7e82b13f4d2493 [diff] |
gdbsupport: allow passing nullptr to checked_static_cast Both static_cast and dynamic_cast handle nullptr (they return nullptr), so I think checked_static_cast should too. This will allow doing a null check after a checked_static_cast: cooked_index_vector *table = (gdb::checked_static_cast<cooked_index_vector *> (per_bfd->index_table.get ())); if (table != nullptr) return; Change-Id: If5c3134e63696f8e417c87b5f3901240c9f7ea97