[Libreoffice-commits] core.git: basic/source
Takeshi Abe
tabe at fixedpoint.jp
Wed May 10 03:49:54 UTC 2017
basic/source/comp/token.cxx | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit e5a4858e1adf5e9f0c5eb808d2155fded6a46728
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Fri May 5 00:24:15 2017 +0900
basic: Compare with keywords without creating temporary strings
Change-Id: Ie284bbe4759a31c48cde415a4e673efd4c789741
Reviewed-on: https://gerrit.libreoffice.org/37252
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>
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();
}
More information about the Libreoffice-commits
mailing list