Use ctor-initializer rather than assignment for non-POD class members

This commit is contained in:
Paul Cornett
2019-02-25 10:23:35 -08:00
parent 8df0cfba2a
commit 7c3ce912e0
59 changed files with 150 additions and 177 deletions

View File

@@ -44,9 +44,9 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject);
// ----------------------------------------------------------------------------
wxCommand::wxCommand(bool canUndoIt, const wxString& name)
: m_commandName(name)
{
m_canUndo = canUndoIt;
m_commandName = name;
}
// ----------------------------------------------------------------------------
@@ -54,17 +54,15 @@ wxCommand::wxCommand(bool canUndoIt, const wxString& name)
// ----------------------------------------------------------------------------
wxCommandProcessor::wxCommandProcessor(int maxCommands)
#if wxUSE_ACCEL
: m_undoAccelerator('\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString())
, m_redoAccelerator('\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString())
#endif // wxUSE_ACCEL
{
m_maxNoCommands = maxCommands;
#if wxUSE_MENUS
m_commandEditMenu = NULL;
#endif // wxUSE_MENUS
#if wxUSE_ACCEL
m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString();
m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString();
#endif // wxUSE_ACCEL
m_lastSavedCommand =
m_currentCommand = wxList::compatibility_iterator();
}