From e5a4858e1adf5e9f0c5eb808d2155fded6a46728 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Fri, 5 May 2017 00:24:15 +0900 Subject: basic: Compare with keywords without creating temporary strings Change-Id: Ie284bbe4759a31c48cde415a4e673efd4c789741 Reviewed-on: https://gerrit.libreoffice.org/37252 Tested-by: Jenkins Reviewed-by: Takeshi Abe --- basic/source/comp/token.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'basic') diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index aea95ef81da5..0fd91c4def1b 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -573,11 +573,8 @@ OUString SbiTokenizer::GetKeywordCase( const OUString& sKeyword ) const TokenTable* tp = pTokTable; for( short i = 0; i < nToken; i++, tp++ ) { - OUString sStr = OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US); - if( sStr.equalsIgnoreAsciiCase(sKeyword) ) - { - return sStr; - } + if( sKeyword.equalsIgnoreAsciiCaseAscii(tp->s) ) + return OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US); } return OUString(); } -- cgit