Remove initializations which are the default value

This commit is contained in:
Paul Cornett
2019-02-25 10:49:04 -08:00
parent 7c3ce912e0
commit 1e753f97ba
10 changed files with 3 additions and 25 deletions

View File

@@ -125,8 +125,6 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
long style)
: wxStyledTextCtrl (parent, id, pos, size, style) {
m_filename = wxEmptyString;
m_LineNrID = 0;
m_DividerID = 1;
m_FoldingID = 2;
@@ -760,7 +758,7 @@ EditProperties::EditProperties (Edit *edit,
text = wxString::Format ("%d", edit->GetLexer());
textinfo->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
wxString EOLtype = wxEmptyString;
wxString EOLtype;
switch (edit->GetEOLMode()) {
case wxSTC_EOL_CR: {EOLtype = "CR (Unix)"; break; }
case wxSTC_EOL_CRLF: {EOLtype = "CRLF (Windows)"; break; }

View File

@@ -362,7 +362,7 @@ void AppFrame::OnFileSave (wxCommandEvent &WXUNUSED(event)) {
void AppFrame::OnFileSaveAs (wxCommandEvent &WXUNUSED(event)) {
if (!m_edit) return;
#if wxUSE_FILEDLG
wxString filename = wxEmptyString;
wxString filename;
wxFileDialog dlg (this, "Save file", wxEmptyString, wxEmptyString, "Any file (*)|*", wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (dlg.ShowModal() != wxID_OK) return;
filename = dlg.GetPath();

View File

@@ -322,7 +322,6 @@ WebFrame::WebFrame(const wxString& url) :
// Set find values.
m_findFlags = wxWEBVIEW_FIND_DEFAULT;
m_findText = wxEmptyString;
m_findCount = 0;
// Create panel for find toolbar.

View File

@@ -714,7 +714,7 @@ void BitmapComboBoxWidgetsPage::LoadWidgetImages( wxArrayString* strings, wxImag
wxBitmap bmp(image);
wxASSERT( bmp.IsOk() );
#else
wxBitmap bmp(wxNullBitmap);
wxBitmap bmp;
#endif
images->Add(bmp);
(*strings)[i] = name;

View File

@@ -612,7 +612,6 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
{
m_action = actionNone;
m_actionWindow = NULL;
m_lastMouseMove = wxPoint();
m_hoverButton = NULL;
m_art = new wxAuiDefaultDockArt;
m_hintWnd = NULL;

View File

@@ -63,8 +63,6 @@ wxCommandProcessor::wxCommandProcessor(int maxCommands)
#if wxUSE_MENUS
m_commandEditMenu = NULL;
#endif // wxUSE_MENUS
m_lastSavedCommand =
m_currentCommand = wxList::compatibility_iterator();
}
wxCommandProcessor::~wxCommandProcessor()

View File

@@ -120,7 +120,6 @@ void wxSplitterWindow::Init()
m_sashPosition = 0;
m_requestedSashPosition = INT_MAX;
m_sashGravity = 0.0;
m_lastSize = wxSize(0,0);
m_minimumPaneSize = 0;
m_sashCursorWE = wxCursor(wxCURSOR_SIZEWE);
m_sashCursorNS = wxCursor(wxCURSOR_SIZENS);

View File

@@ -70,7 +70,6 @@ static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask);
wxImageList::wxImageList()
{
m_hImageList = 0;
m_size = wxSize(0,0);
}
// Creates an image list

View File

@@ -198,7 +198,6 @@ void wxRibbonPage::CommonInit(const wxString& label, const wxBitmap& icon)
SetName(label);
SetLabel(label);
m_old_size = wxSize(0, 0);
m_icon = icon;
m_scroll_left_btn = NULL;
m_scroll_right_btn = NULL;

View File

@@ -112,7 +112,6 @@ void wxRibbonToolBar::CommonInit(long WXUNUSED(style))
m_nrows_min = 1;
m_nrows_max = 1;
m_sizes = new wxSize[1];
m_sizes[0] = wxSize(0, 0);
SetBackgroundStyle(wxBG_STYLE_PAINT);
}
@@ -259,8 +258,6 @@ wxRibbonToolBarToolBase* wxRibbonToolBar::InsertTool(
tool->help_string = help_string;
tool->kind = kind;
tool->client_data = client_data;
tool->position = wxPoint(0, 0);
tool->size = wxSize(0, 0);
tool->state = 0;
// Find the position where insert tool
@@ -318,8 +315,6 @@ wxRibbonToolBarToolBase* wxRibbonToolBar::InsertSeparator(size_t pos)
wxRibbonToolBarToolGroup* wxRibbonToolBar::InsertGroup(size_t pos)
{
wxRibbonToolBarToolGroup* group = new wxRibbonToolBarToolGroup;
group->position = wxPoint(0, 0);
group->size = wxSize(0, 0);
m_groups.Insert(group, pos);
return group;
}
@@ -525,8 +520,6 @@ wxBitmap wxRibbonToolBar::MakeDisabledBitmap(const wxBitmap& original)
void wxRibbonToolBar::AppendGroup()
{
wxRibbonToolBarToolGroup* group = new wxRibbonToolBarToolGroup;
group->position = wxPoint(0, 0);
group->size = wxSize(0, 0);
m_groups.Add(group);
}
@@ -723,8 +716,6 @@ void wxRibbonToolBar::SetRows(int nMin, int nMax)
delete[] m_sizes;
m_sizes = new wxSize[m_nrows_max - m_nrows_min + 1];
for(int i = m_nrows_min; i <= m_nrows_max; ++i)
m_sizes[i - m_nrows_min] = wxSize(0, 0);
Realize();
}
@@ -801,8 +792,6 @@ bool wxRibbonToolBar::Realize()
for(nrows = m_nrows_min; nrows <= m_nrows_max; ++nrows)
{
for(r = 0; r < nrows; ++r)
row_sizes[r] = wxSize(0, 0);
for(g = 0; g < group_count; ++g)
{
wxRibbonToolBarToolGroup* group = m_groups.Item(g);
@@ -902,8 +891,6 @@ void wxRibbonToolBar::OnSize(wxSizeEvent& evt)
int sep = m_art->GetMetric(wxRIBBON_ART_TOOL_GROUP_SEPARATION_SIZE);
int r;
for(r = 0; r < row_count; ++r)
row_sizes[r] = wxSize(0, 0);
size_t g;
size_t group_count = m_groups.GetCount();
for(g = 0; g < group_count; ++g)