fix for compilation with wxUSE_WCHAR_T==0 (bug 615084)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -104,10 +104,19 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxMB2WXbuf *m_buf;
|
wxMB2WXbuf *m_buf;
|
||||||
|
|
||||||
#else
|
#else // !wxUSE_UNICODE
|
||||||
wxLV_ITEM(LV_ITEMW &item)
|
wxLV_ITEM(LV_ITEMW &item)
|
||||||
{
|
{
|
||||||
m_item = new LV_ITEM((LV_ITEM&)item);
|
m_item = new LV_ITEM((LV_ITEM&)item);
|
||||||
|
|
||||||
|
// the code below doesn't compile without wxUSE_WCHAR_T and as I don't
|
||||||
|
// know if it's useful to have it at all (do we ever get Unicode
|
||||||
|
// notifications in ANSI mode? I don't think so...) I'm not going to
|
||||||
|
// write alternative implementation right now
|
||||||
|
//
|
||||||
|
// but if it is indeed used, we should simply directly use
|
||||||
|
// ::WideCharToMultiByte() here
|
||||||
|
#if wxUSE_WCHAR_T
|
||||||
if ( (item.mask & LVIF_TEXT) && item.pszText )
|
if ( (item.mask & LVIF_TEXT) && item.pszText )
|
||||||
{
|
{
|
||||||
#ifdef __WXWINE__
|
#ifdef __WXWINE__
|
||||||
@@ -119,12 +128,13 @@ private:
|
|||||||
m_item->pszText = (wxChar*)m_buf->data();
|
m_item->pszText = (wxChar*)m_buf->data();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif // wxUSE_WCHAR_T
|
||||||
m_buf = NULL;
|
m_buf = NULL;
|
||||||
}
|
}
|
||||||
wxLV_ITEM(LV_ITEMA &item) : m_buf(NULL), m_item(&item) {}
|
wxLV_ITEM(LV_ITEMA &item) : m_buf(NULL), m_item(&item) {}
|
||||||
private:
|
private:
|
||||||
wxWC2WXbuf *m_buf;
|
wxWC2WXbuf *m_buf;
|
||||||
#endif
|
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
||||||
|
|
||||||
LV_ITEM *m_item;
|
LV_ITEM *m_item;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user