- // default ctor: if autoSort is TRUE, the array is always sorted (in
- // alphabetical order)
- wxArrayString(bool autoSort = FALSE);
+ // default ctor
+ wxArrayString()
+ : m_nSize(0), m_nCount(0), m_pItems(NULL), m_autoSort(FALSE)
+ { Init(FALSE); }
+ // if autoSort is TRUE, the array is always sorted (in alphabetical order)
+ //
+ // 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)
+ : m_nSize(0), m_nCount(0), m_pItems(NULL), m_autoSort(FALSE)
+ { Init(autoSort != 0); }