summaryrefslogtreecommitdiff
path: root/sax/source/expatwrap/xml2utf.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sax/source/expatwrap/xml2utf.cxx')
-rw-r--r--sax/source/expatwrap/xml2utf.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index c71f0bf2a993..103ef46344cb 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -187,15 +187,8 @@ bool XMLFile2UTFConverter::isEncodingRecognizable( const Sequence< sal_Int8 > &s
if( bCheckIfFirstClosingBracketExsists )
{
- for( sal_Int32 i = 0; i < seq.getLength() ; i ++ )
- {
- // whole <?xml tag is valid
- if( '>' == pSource[ i ] )
- {
- return true;
- }
- }
- return false;
+ // whole <?xml tag is valid
+ return std::find(seq.begin(), seq.end(), '>') != seq.end();
}
// No <? tag in front, no need for a bigger buffer