fixed wxHtmlParser::SkipCommentTag() to run the initial test in O(1) instead of O(n) in UTF8 build, makes big difference for large HTML files

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-08-22 05:45:11 +00:00
parent 2d615fe933
commit 95ebbfe1fd

View File

@@ -953,7 +953,7 @@ wxHtmlParser::SkipCommentTag(wxString::const_iterator& start,
wxString::const_iterator p = start;
// comments begin with "<!--" in HTML 4.0
if ( end - p < 3 || *++p != '!' || *++p != '-' || *++p != '-' )
if ( p > end - 3 || *++p != '!' || *++p != '-' || *++p != '-' )
{
// not a comment at all
return false;