Unicode-mode typos in string.cpp (where did they suddenly come from?)
More Unicode-build conversion. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
111bb7f2ea
commit
cf2f341a0a
@ -45,7 +45,7 @@
|
||||
#endif
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
wxClassInfo wxObject::sm_classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
|
||||
wxClassInfo wxObject::sm_classwxObject((wxChar *) _T("wxObject"), (wxChar *) NULL, (wxChar *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
|
||||
wxClassInfo* wxClassInfo::sm_first = (wxClassInfo *) NULL;
|
||||
wxHashTable* wxClassInfo::sm_classTable = (wxHashTable*) NULL;
|
||||
#endif
|
||||
@ -140,7 +140,7 @@ void wxObject::operator delete[] (void * buf)
|
||||
* Class info: provides run-time class type information.
|
||||
*/
|
||||
|
||||
wxClassInfo::wxClassInfo(char *cName, char *baseName1, char *baseName2, int sz, wxObjectConstructorFn constr)
|
||||
wxClassInfo::wxClassInfo(wxChar *cName, wxChar *baseName1, wxChar *baseName2, int sz, wxObjectConstructorFn constr)
|
||||
{
|
||||
m_className = cName;
|
||||
m_baseClassName1 = baseName1;
|
||||
@ -164,12 +164,12 @@ wxObject *wxClassInfo::CreateObject()
|
||||
return (wxObject *) NULL;
|
||||
}
|
||||
|
||||
wxClassInfo *wxClassInfo::FindClass(char *c)
|
||||
wxClassInfo *wxClassInfo::FindClass(wxChar *c)
|
||||
{
|
||||
wxClassInfo *p = sm_first;
|
||||
while (p)
|
||||
{
|
||||
if (p && p->GetClassName() && strcmp(p->GetClassName(), c) == 0)
|
||||
if (p && p->GetClassName() && wxStrcmp(p->GetClassName(), c) == 0)
|
||||
return p;
|
||||
p = p->m_next;
|
||||
}
|
||||
@ -238,7 +238,7 @@ void wxClassInfo::CleanUpClasses()
|
||||
wxClassInfo::sm_classTable = NULL;
|
||||
}
|
||||
|
||||
wxObject *wxCreateDynamicObject(const char *name)
|
||||
wxObject *wxCreateDynamicObject(const wxChar *name)
|
||||
{
|
||||
if (wxClassInfo::sm_classTable)
|
||||
{
|
||||
@ -253,7 +253,7 @@ wxObject *wxCreateDynamicObject(const char *name)
|
||||
wxClassInfo *info = wxClassInfo::sm_first;
|
||||
while (info)
|
||||
{
|
||||
if (info->m_className && strcmp(info->m_className, name) == 0)
|
||||
if (info->m_className && wxStrcmp(info->m_className, name) == 0)
|
||||
return info->CreateObject();
|
||||
info = info->m_next;
|
||||
}
|
||||
|
@ -398,12 +398,12 @@ void wxPreviewControlBar::SetZoomControl(int zoom)
|
||||
|
||||
int wxPreviewControlBar::GetZoomControl()
|
||||
{
|
||||
char buf[20];
|
||||
wxChar buf[20];
|
||||
if (m_zoomControl && (m_zoomControl->GetStringSelection() != ""))
|
||||
{
|
||||
strcpy(buf, m_zoomControl->GetStringSelection());
|
||||
buf[strlen(buf) - 1] = 0;
|
||||
return (int)atoi(buf);
|
||||
wxStrcpy(buf, m_zoomControl->GetStringSelection());
|
||||
buf[wxStrlen(buf) - 1] = 0;
|
||||
return (int)wxAtoi(buf);
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
@ -688,11 +688,11 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
|
||||
memoryDC.SelectObject(wxNullBitmap);
|
||||
|
||||
char buf[200];
|
||||
wxChar buf[200];
|
||||
if (m_maxPage != 0)
|
||||
sprintf(buf, _("Page %d of %d"), pageNum, m_maxPage);
|
||||
wxSprintf(buf, _("Page %d of %d"), pageNum, m_maxPage);
|
||||
else
|
||||
sprintf(buf, _("Page %d"), pageNum);
|
||||
wxSprintf(buf, _("Page %d"), pageNum);
|
||||
|
||||
if (m_previewFrame)
|
||||
m_previewFrame->SetStatusText(buf);
|
||||
|
@ -253,7 +253,7 @@ wxString::wxString(const void *pStart, const void *pEnd)
|
||||
#if wxUSE_UNICODE
|
||||
|
||||
// from multibyte string
|
||||
wxString::wxString(const char *psz, wxMBConvv& conv, size_t nLength)
|
||||
wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength)
|
||||
{
|
||||
// first get necessary size
|
||||
|
||||
@ -1166,7 +1166,7 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
|
||||
char *val = va_arg(argptr, char *);
|
||||
#if wxUSE_UNICODE
|
||||
// ASCII->Unicode constructor handles max_width right
|
||||
wxString s(val, max_width);
|
||||
wxString s(val, wxConv_libc, max_width);
|
||||
#else
|
||||
size_t len = wxSTRING_MAXLEN;
|
||||
if (val) {
|
||||
@ -1667,7 +1667,7 @@ void wxArrayString::Insert(const wxString& str, size_t nIndex)
|
||||
{
|
||||
wxASSERT( str.GetStringData()->IsValid() );
|
||||
|
||||
wxCHECK_RET( nIndex <= m_nCount, ("bad index in wxArrayString::Insert") );
|
||||
wxCHECK_RET( nIndex <= m_nCount, _("bad index in wxArrayString::Insert") );
|
||||
|
||||
Grow();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user