]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/benchmarks/htmlparser/htmlpars.cpp
proper default for iphone
[wxWidgets.git] / tests / benchmarks / htmlparser / htmlpars.cpp
index 7d7e5eaed56ce2a4b264a7b1613f5f38e1e4682c..7a5a5bf5785e9a0992f99d0dd12052b1e497c166 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/html/htmlpars.cpp
 // Purpose:     wx28HtmlParser class (generic parser)
 // Author:      Vaclav Slavik
 // Name:        src/html/htmlpars.cpp
 // Purpose:     wx28HtmlParser class (generic parser)
 // Author:      Vaclav Slavik
-// RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 1999 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -295,7 +294,7 @@ void wx28HtmlParser::DoParsing(int begin_pos, int end_pos)
             // Add text:
             AddText(GetEntitiesParser()->Parse(
                        m_Source.Mid(pieces[m_CurTextPiece].m_pos,
             // Add text:
             AddText(GetEntitiesParser()->Parse(
                        m_Source.Mid(pieces[m_CurTextPiece].m_pos,
-                                    pieces[m_CurTextPiece].m_lng)));
+                                    pieces[m_CurTextPiece].m_lng)).t_str());
             begin_pos = pieces[m_CurTextPiece].m_pos +
                         pieces[m_CurTextPiece].m_lng;
             m_CurTextPiece++;
             begin_pos = pieces[m_CurTextPiece].m_pos +
                         pieces[m_CurTextPiece].m_lng;
             m_CurTextPiece++;
@@ -459,7 +458,7 @@ void wx28HtmlTagHandler::ParseInnerSource(const wxString& source)
 IMPLEMENT_DYNAMIC_CLASS(wx28HtmlEntitiesParser,wxObject)
 
 wx28HtmlEntitiesParser::wx28HtmlEntitiesParser()
 IMPLEMENT_DYNAMIC_CLASS(wx28HtmlEntitiesParser,wxObject)
 
 wx28HtmlEntitiesParser::wx28HtmlEntitiesParser()
-#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+#if !wxUSE_UNICODE
     : m_conv(NULL), m_encoding(wxFONTENCODING_SYSTEM)
 #endif
 {
     : m_conv(NULL), m_encoding(wxFONTENCODING_SYSTEM)
 #endif
 {
@@ -467,14 +466,14 @@ wx28HtmlEntitiesParser::wx28HtmlEntitiesParser()
 
 wx28HtmlEntitiesParser::~wx28HtmlEntitiesParser()
 {
 
 wx28HtmlEntitiesParser::~wx28HtmlEntitiesParser()
 {
-#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+#if !wxUSE_UNICODE
     delete m_conv;
 #endif
 }
 
 void wx28HtmlEntitiesParser::SetEncoding(wxFontEncoding encoding)
 {
     delete m_conv;
 #endif
 }
 
 void wx28HtmlEntitiesParser::SetEncoding(wxFontEncoding encoding)
 {
-#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+#if !wxUSE_UNICODE
     if (encoding == m_encoding)
         return;
 
     if (encoding == m_encoding)
         return;
 
@@ -552,7 +551,6 @@ extern "C" int LINKAGEMODE wx28HtmlEntityCompare(const void *key, const void *it
 #if !wxUSE_UNICODE
 wxChar wx28HtmlEntitiesParser::GetCharForCode(unsigned code)
 {
 #if !wxUSE_UNICODE
 wxChar wx28HtmlEntitiesParser::GetCharForCode(unsigned code)
 {
-#if wxUSE_WCHAR_T
     char buf[2];
     wchar_t wbuf[2];
     wbuf[0] = (wchar_t)code;
     char buf[2];
     wchar_t wbuf[2];
     wbuf[0] = (wchar_t)code;
@@ -561,9 +559,6 @@ wxChar wx28HtmlEntitiesParser::GetCharForCode(unsigned code)
     if (conv->WC2MB(buf, wbuf, 2) == (size_t)-1)
         return '?';
     return buf[0];
     if (conv->WC2MB(buf, wbuf, 2) == (size_t)-1)
         return '?';
     return buf[0];
-#else
-    return (code < 256) ? (wxChar)code : '?';
-#endif
 }
 #endif
 
 }
 #endif