diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-12 13:33:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-12 13:35:49 +0100 |
commit | 7d042c50f5b8e1d61f0615ae8aff5714840be01b (patch) | |
tree | 8a6fc73320ce0d3d6aaf71e36afbd3c76f51c4ca /basic | |
parent | df4c929bc36c168a55c3467c783fd0256b90dc45 (diff) |
use rtl_ustr_getLength instead of a temporary string just to find length
Change-Id: Ibbf777e57af6b98611cb5dce5a31517de80305b7
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/scanner.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 6f7f0bdad1c3..cef84c935132 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -433,8 +433,7 @@ bool SbiScanner::NextSym() // from 4.1.1996: buffer full, go on scanning empty if( (p-buf) == (BUF_SIZE-1) ) bBufOverflow = true; - else if( String( cmp ).Search( ch ) != STRING_NOTFOUND ) - //else if( strchr( cmp, ch ) ) + else if( rtl::OUString( cmp ).indexOf( ch ) != -1 ) *p++ = ch; else { @@ -522,7 +521,7 @@ PrevLineCommentLbl: { bPrevLineExtentsComment = false; aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REM")); - sal_Int32 nLen = String( pLine ).Len(); + sal_Int32 nLen = rtl_ustr_getLength(pLine); if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' ) bPrevLineExtentsComment = true; nCol2 = nCol2 + nLen; |