Disable cppcoreguidelines-owning-memory
Due to how wxWidgets works, certain parts of it don't require owning the memory and it's just recommend to use raw pointers instead.
This commit is contained in:
parent
505e4ac4d1
commit
06a472a358
|
@ -28,6 +28,8 @@ wxBEGIN_EVENT_TABLE(MainPanel, wxPanel)
|
|||
#endif // wxUSE_DIRDLG
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
// NOLINTBEGIN(cppcoreguidelines-owning-memory): wxWidgets already manages its
|
||||
// memory more or less so that there's no need for owning the memory
|
||||
MainPanel::MainPanel(wxWindow *window, int x, int y, int w, int h,
|
||||
const std::string &handlerName)
|
||||
: wxPanel(window, wxID_ANY, wxPoint(x, y), wxSize(w, h)),
|
||||
|
@ -100,6 +102,7 @@ MainPanel::MainPanel(wxWindow *window, int x, int y, int w, int h,
|
|||
|
||||
SetSizer(topSizer);
|
||||
}
|
||||
// NOLINTEND(cppcoreguidelines-owning-memory)
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
/*
|
||||
|
|
|
@ -35,6 +35,8 @@ wxBEGIN_EVENT_TABLE(StagesPanel, wxPanel)
|
|||
EVT_BUTTON(STAGES_SET_DEFAULT, StagesPanel::OnResetWeightStages)
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
// NOLINTBEGIN(cppcoreguidelines-owning-memory): wxWidgets already manages its
|
||||
// memory more or less so that there's no need for owning the memory
|
||||
StagesPanel::StagesPanel(wxWindow *window, int x, int y, int w, int h,
|
||||
const std::string &handlerName)
|
||||
: wxPanel(window, wxID_ANY, wxPoint(x, y), wxSize(w, h)),
|
||||
|
@ -146,6 +148,7 @@ StagesPanel::StagesPanel(wxWindow *window, int x, int y, int w, int h,
|
|||
|
||||
SetSizer(topSizer);
|
||||
}
|
||||
// NOLINTEND(cppcoreguidelines-owning-memory)
|
||||
|
||||
void StagesPanel::DoAddWeightStage(Starpounds::WeightStage stage) {
|
||||
stage.SetName(GetInternalNameReplacement(stage));
|
||||
|
|
|
@ -37,10 +37,13 @@ bool App::OnInit() {
|
|||
return false;
|
||||
}
|
||||
|
||||
// NOLINTBEGIN(cppcoreguidelines-owning-memory): wxWidgets already manages
|
||||
// its memory more or less so that there's no need for owning the memory
|
||||
Frame *frame = new Frame("Species Support Generator", 680, 480);
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
wxMenu *help_menu = new wxMenu;
|
||||
wxMenuBar *menu_bar = new wxMenuBar(wxMB_DOCKABLE);
|
||||
// NOLINTEND(cppcoreguidelines-owning-memory)
|
||||
|
||||
#if wxUSE_FILEDLG
|
||||
file_menu->Append(TEXT_EXPORT, "&Export weightstages\tCTRL+S",
|
||||
|
@ -107,6 +110,8 @@ wxBEGIN_EVENT_TABLE(Frame, wxFrame)
|
|||
#endif // wxUSE_CLIPBOARD
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
// NOLINTBEGIN(cppcoreguidelines-owning-memory): wxWidgets already manages its
|
||||
// memory more or less so that there's no need for owning the memory
|
||||
Frame::Frame(const wxString &title, int x, int y)
|
||||
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(x, y),
|
||||
wxDEFAULT_FRAME_STYLE) {
|
||||
|
@ -158,6 +163,7 @@ Frame::Frame(const wxString &title, int x, int y)
|
|||
m_panel_stages->m_subRemove->Bind(wxEVT_BUTTON,
|
||||
&Frame::OnRemoveWeightStageSub, this);
|
||||
}
|
||||
// NOLINTEND(cppcoreguidelines-owning-memory)
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue