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:
Vadim Zeitlin
2022-04-07 23:22:55 +01:00
parent 68b65c7333
commit 53844108dd
2 changed files with 4 additions and 4 deletions

View File

@@ -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();