Make the wxArrayString(int) ctor explicit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2010-06-17 13:04:21 +00:00
parent 5e30622919
commit 2ab514cad4

View File

@@ -136,11 +136,11 @@ public:
// //
// NB: the reason for using int and not bool is that like this we can avoid // 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 // using this ctor for implicit conversions from "const char *" (which
// we'd like to be implicitly converted to wxString instead!) // we'd like to be implicitly converted to wxString instead!). This
// // wouldn't be needed if the 'explicit' keyword was supported by all
// of course, using explicit would be even better - if all compilers // compilers, or if this was protected ctor for wxSortedArrayString,
// supported it... // but we're stuck with it now.
wxArrayString(int autoSort) { Init(autoSort != 0); } wxEXPLICIT wxArrayString(int autoSort) { Init(autoSort != 0); }
// C string array ctor // C string array ctor
wxArrayString(size_t sz, const char** a); wxArrayString(size_t sz, const char** a);
wxArrayString(size_t sz, const wchar_t** a); wxArrayString(size_t sz, const wchar_t** a);