Use ctor-initializer rather than assignment for non-POD class members
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user