Make wxWindowDisabler ctors explicit
Implicitly converting a bool or a wxWindow pointer to this class makes no sense and shouldn't be allowed, so don't allow it.
This commit is contained in:
@@ -730,10 +730,10 @@ class WXDLLIMPEXP_CORE wxWindowDisabler
|
||||
public:
|
||||
// this ctor conditionally disables all windows: if the argument is false,
|
||||
// it doesn't do anything
|
||||
wxWindowDisabler(bool disable = true);
|
||||
explicit wxWindowDisabler(bool disable = true);
|
||||
|
||||
// ctor disables all windows except winToSkip
|
||||
wxWindowDisabler(wxWindow *winToSkip);
|
||||
explicit wxWindowDisabler(wxWindow *winToSkip);
|
||||
|
||||
// dtor enables back all windows disabled by the ctor
|
||||
~wxWindowDisabler();
|
||||
|
||||
Reference in New Issue
Block a user