From 2ab514cad478706f5b215a966b9f1ea4db8277c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 17 Jun 2010 13:04:21 +0000 Subject: [PATCH] Make the wxArrayString(int) ctor explicit. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/arrstr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/wx/arrstr.h b/include/wx/arrstr.h index 33a2f05de1..9fe25c6b0a 100644 --- a/include/wx/arrstr.h +++ b/include/wx/arrstr.h @@ -136,11 +136,11 @@ public: // // NB: the reason for using int and not bool is that like this we can avoid // using this ctor for implicit conversions from "const char *" (which - // we'd like to be implicitly converted to wxString instead!) - // - // of course, using explicit would be even better - if all compilers - // supported it... - wxArrayString(int autoSort) { Init(autoSort != 0); } + // we'd like to be implicitly converted to wxString instead!). This + // wouldn't be needed if the 'explicit' keyword was supported by all + // compilers, or if this was protected ctor for wxSortedArrayString, + // but we're stuck with it now. + wxEXPLICIT wxArrayString(int autoSort) { Init(autoSort != 0); } // C string array ctor wxArrayString(size_t sz, const char** a); wxArrayString(size_t sz, const wchar_t** a); -- 2.45.2