Enable gcc attribute suggestion warnings
Adding `final` can allow gcc to devirtualize a call. Request compiler warnings wherever `final` would improve this. As of this writing, there are no places where `final` would be helpful and would also be wrong, so this is enabled everywhere.
This commit is contained in:
parent
7981fd1b17
commit
16698137ea
|
@ -2710,6 +2710,8 @@ constexpr literal_as_type<T, v...> operator""_literal_as_type();
|
|||
'-Wduplicated-branches',
|
||||
'-Wduplicated-cond',
|
||||
'-Wsuggest-attribute=noreturn',
|
||||
'-Wsuggest-final-types',
|
||||
'-Wsuggest-override',
|
||||
'-Wlogical-op',
|
||||
'-Wold-style-cast',
|
||||
'-Wredundant-decls',
|
||||
|
|
|
@ -520,7 +520,7 @@ extern grs_subcanvas _canv_editor_game; //the game on the editor screen
|
|||
extern grs_canvas *Canv_editor; //the editor screen
|
||||
extern grs_subcanvas *const Canv_editor_game; //the game on the editor screen
|
||||
|
||||
struct editor_dialog : UI_DIALOG
|
||||
struct editor_dialog final : UI_DIALOG
|
||||
{
|
||||
using UI_DIALOG::UI_DIALOG;
|
||||
std::array<std::unique_ptr<UI_GADGET_BUTTON>, 9> pad_goto;
|
||||
|
|
|
@ -156,7 +156,7 @@ enum class StereoFormat : uint8_t
|
|||
#ifdef dsx
|
||||
namespace dsx {
|
||||
|
||||
struct game_window : window
|
||||
struct game_window final : window
|
||||
{
|
||||
using window::window;
|
||||
virtual window_event_result event_handler(const d_event &) override;
|
||||
|
|
|
@ -553,7 +553,7 @@ namespace dcx {
|
|||
|
||||
int nm_messagebox_str(menu_title title, const nm_messagebox_tie &tie, menu_subtitle str);
|
||||
|
||||
struct messagebox_newmenu :
|
||||
struct messagebox_newmenu final :
|
||||
std::array<newmenu_item, nm_messagebox_tie::maximum_arity>,
|
||||
newmenu
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue