Remove wxUSE_WCHAR_T checks.

wxWidgets requires wchar_t for some time now; wx/chartype.h has a check
to fail complation without it. Simplify code by removing now-dead code
for the !wxUSE_WCHAR_T case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2010-04-16 10:43:18 +00:00
parent 605ff820f5
commit 8d94819c43
28 changed files with 80 additions and 278 deletions

View File

@@ -569,7 +569,6 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
// Now store the contents range
bookr->SetContentsRange(cont_start, m_contents.size());
#if wxUSE_WCHAR_T
// MS HTML Help files [written by MS HTML Help Workshop] are broken
// in that the data are iso-8859-1 (including HTML entities), but must
// be interpreted as being in language's windows charset. Correct the
@@ -597,11 +596,6 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
}
#undef CORRECT_STR
}
#else
wxUnusedVar(IndexOld);
wxUnusedVar(ContentsOld);
wxASSERT_MSG(encoding == wxFONTENCODING_SYSTEM, wxT("Help files need charset conversion, but wxUSE_WCHAR_T is 0"));
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
m_bookRecords.Add(bookr);
if (!m_index.empty())

View File

@@ -433,7 +433,7 @@ void wxHtmlTagHandler::ParseInnerSource(const wxString& source)
IMPLEMENT_DYNAMIC_CLASS(wxHtmlEntitiesParser,wxObject)
wxHtmlEntitiesParser::wxHtmlEntitiesParser()
#if wxUSE_WCHAR_T && !wxUSE_UNICODE
#if !wxUSE_UNICODE
: m_conv(NULL), m_encoding(wxFONTENCODING_SYSTEM)
#endif
{
@@ -441,14 +441,14 @@ wxHtmlEntitiesParser::wxHtmlEntitiesParser()
wxHtmlEntitiesParser::~wxHtmlEntitiesParser()
{
#if wxUSE_WCHAR_T && !wxUSE_UNICODE
#if !wxUSE_UNICODE
delete m_conv;
#endif
}
#if !wxUSE_UNICODE
void wxHtmlEntitiesParser::SetEncoding(wxFontEncoding encoding)
{
#if wxUSE_WCHAR_T && !wxUSE_UNICODE
if (encoding == m_encoding)
return;
@@ -459,10 +459,8 @@ void wxHtmlEntitiesParser::SetEncoding(wxFontEncoding encoding)
m_conv = NULL;
else
m_conv = new wxCSConv(wxFontMapper::GetEncodingName(m_encoding));
#else
(void) encoding;
#endif
}
#endif // !wxUSE_UNICODE
wxString wxHtmlEntitiesParser::Parse(const wxString& input) const
{
@@ -523,7 +521,6 @@ wxString wxHtmlEntitiesParser::Parse(const wxString& input) const
#if !wxUSE_UNICODE
wxChar wxHtmlEntitiesParser::GetCharForCode(unsigned code) const
{
#if wxUSE_WCHAR_T
char buf[2];
wchar_t wbuf[2];
wbuf[0] = (wchar_t)code;
@@ -532,9 +529,6 @@ wxChar wxHtmlEntitiesParser::GetCharForCode(unsigned code) const
if (conv->WC2MB(buf, wbuf, 2) == (size_t)-1)
return '?';
return buf[0];
#else
return (code < 256) ? (wxChar)code : '?';
#endif
}
#endif

View File

@@ -285,7 +285,7 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
if (winIface)
{
wxString title(tag.GetBeginIter(), tag.GetEndIter1());
#if !wxUSE_UNICODE && wxUSE_WCHAR_T
#if !wxUSE_UNICODE
const wxFontEncoding enc = m_WParser->GetInputEncoding();
if ( enc != wxFONTENCODING_DEFAULT )
{