assert if wxString(void* pStart,void *pEnd) ctor is used incorrectly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -173,10 +173,18 @@ void wxStringBase::InitWith(const wxChar *psz, size_t nPos, size_t nLength)
|
|||||||
|
|
||||||
// poor man's iterators are "void *" pointers
|
// poor man's iterators are "void *" pointers
|
||||||
wxStringBase::wxStringBase(const void *pStart, const void *pEnd)
|
wxStringBase::wxStringBase(const void *pStart, const void *pEnd)
|
||||||
|
{
|
||||||
|
if ( pEnd > pStart )
|
||||||
{
|
{
|
||||||
InitWith((const wxChar *)pStart, 0,
|
InitWith((const wxChar *)pStart, 0,
|
||||||
(const wxChar *)pEnd - (const wxChar *)pStart);
|
(const wxChar *)pEnd - (const wxChar *)pStart);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( _T("pStart is not before pEnd") );
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxStringBase::wxStringBase(size_type n, wxChar ch)
|
wxStringBase::wxStringBase(size_type n, wxChar ch)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user