diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2017-05-05 00:24:15 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2017-05-10 05:49:19 +0200 |
commit | e5a4858e1adf5e9f0c5eb808d2155fded6a46728 (patch) | |
tree | 90f1315903b03e7658867a6b3e773028f39fcfde /basic/source | |
parent | 0a4b0db012d6a800cb77ce10e72dffb62a878049 (diff) |
basic: Compare with keywords without creating temporary strings
Change-Id: Ie284bbe4759a31c48cde415a4e673efd4c789741
Reviewed-on: https://gerrit.libreoffice.org/37252
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/comp/token.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
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(); } |