Make wxWindowUpdateLocker ctor explicit
No real changes, just avoid using ctor allowing implicit conversions when none are desired.
This commit is contained in:
@@ -21,7 +21,7 @@ class wxWindowUpdateLocker
|
|||||||
public:
|
public:
|
||||||
// create an object preventing updates of the given window (which must have
|
// create an object preventing updates of the given window (which must have
|
||||||
// a lifetime at least as great as ours)
|
// a lifetime at least as great as ours)
|
||||||
wxWindowUpdateLocker(wxWindow *win) : m_win(win) { win->Freeze(); }
|
explicit wxWindowUpdateLocker(wxWindow *win) : m_win(win) { win->Freeze(); }
|
||||||
|
|
||||||
// dtor thaws the window to permit updates again
|
// dtor thaws the window to permit updates again
|
||||||
~wxWindowUpdateLocker() { m_win->Thaw(); }
|
~wxWindowUpdateLocker() { m_win->Thaw(); }
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
The parameter must be non-@NULL and the window must exist for longer than
|
The parameter must be non-@NULL and the window must exist for longer than
|
||||||
wxWindowUpdateLocker object itself.
|
wxWindowUpdateLocker object itself.
|
||||||
*/
|
*/
|
||||||
wxWindowUpdateLocker(wxWindow* win);
|
explicit wxWindowUpdateLocker(wxWindow* win);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor reenables updates for the window this object is associated with.
|
Destructor reenables updates for the window this object is associated with.
|
||||||
|
Reference in New Issue
Block a user