From ad59df7355f47b32134014f6b5617fc715bf942a Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 17 Feb 2019 18:19:16 -0800 Subject: [PATCH] Remove unuseable wxListBase ctor It calls Append(void*), which calls the pure virtual CreateNode(), which will crash, as the required override can't be called from the base class ctor. --- include/wx/list.h | 4 ---- src/common/list.cpp | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index 22446a2dd4..6d32116b1c 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -498,8 +498,6 @@ protected: // ctors - // from an array - wxListBase(size_t count, void *elements[]); // from a sequence of objects wxListBase(void *object, ... /* terminate with NULL */); @@ -688,8 +686,6 @@ private: { } \ name(const name& list) : wxListBase(list.GetKeyType()) \ { Assign(list); } \ - name(size_t count, T *elements[]) \ - : wxListBase(count, (void **)elements) { } \ \ name& operator=(const name& list) \ { if (&list != this) Assign(list); return *this; } \ diff --git a/src/common/list.cpp b/src/common/list.cpp index decaf8bb36..64bfbcb9a9 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -147,16 +147,6 @@ void wxListBase::Init(wxKeyType keyType) m_keyType = keyType; } -wxListBase::wxListBase(size_t count, void *elements[]) -{ - Init(); - - for ( size_t n = 0; n < count; n++ ) - { - Append(elements[n]); - } -} - void wxListBase::DoCopy(const wxListBase& list) { wxASSERT_MSG( !list.m_destroy,