From 152f3154bef4af443c87d3aab03cf9c7f577d475 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 May 2020 02:29:05 +0200 Subject: [PATCH] Make wxWindowUpdateLocker ctor explicit No real changes, just avoid using ctor allowing implicit conversions when none are desired. --- include/wx/wupdlock.h | 2 +- interface/wx/wupdlock.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/wupdlock.h b/include/wx/wupdlock.h index 8654ef355b..c1ff5f0ad0 100644 --- a/include/wx/wupdlock.h +++ b/include/wx/wupdlock.h @@ -21,7 +21,7 @@ class wxWindowUpdateLocker public: // create an object preventing updates of the given window (which must have // 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 ~wxWindowUpdateLocker() { m_win->Thaw(); } diff --git a/interface/wx/wupdlock.h b/interface/wx/wupdlock.h index 562fbfa0a7..763ac84213 100644 --- a/interface/wx/wupdlock.h +++ b/interface/wx/wupdlock.h @@ -40,7 +40,7 @@ public: The parameter must be non-@NULL and the window must exist for longer than wxWindowUpdateLocker object itself. */ - wxWindowUpdateLocker(wxWindow* win); + explicit wxWindowUpdateLocker(wxWindow* win); /** Destructor reenables updates for the window this object is associated with.