Make wxCaret init functions private
Init functions are not supposed to be called by derived classes, they have already been called by the base ctors.
This commit is contained in:
@@ -164,15 +164,6 @@ protected:
|
||||
virtual void DoMove() = 0;
|
||||
virtual void DoSize() { }
|
||||
|
||||
// the common initialization
|
||||
void Init()
|
||||
{
|
||||
m_window = NULL;
|
||||
m_x = m_y = 0;
|
||||
m_width = m_height = 0;
|
||||
m_countVisible = 0;
|
||||
}
|
||||
|
||||
// the size of the caret
|
||||
int m_width, m_height;
|
||||
|
||||
@@ -186,6 +177,14 @@ protected:
|
||||
int m_countVisible;
|
||||
|
||||
private:
|
||||
void Init()
|
||||
{
|
||||
m_window = NULL;
|
||||
m_x = m_y = 0;
|
||||
m_width = m_height = 0;
|
||||
m_countVisible = 0;
|
||||
}
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxCaretBase);
|
||||
};
|
||||
|
||||
|
||||
@@ -36,13 +36,6 @@ public:
|
||||
virtual void OnKillFocus() wxOVERRIDE;
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
wxCaretBase::Init();
|
||||
|
||||
m_hasCaret = false;
|
||||
}
|
||||
|
||||
// override base class virtuals
|
||||
virtual void DoMove() wxOVERRIDE;
|
||||
virtual void DoShow() wxOVERRIDE;
|
||||
@@ -53,6 +46,11 @@ protected:
|
||||
bool MSWCreateCaret();
|
||||
|
||||
private:
|
||||
void Init()
|
||||
{
|
||||
m_hasCaret = false;
|
||||
}
|
||||
|
||||
bool m_hasCaret;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxCaret);
|
||||
|
||||
Reference in New Issue
Block a user