From a7674482254ee996b1c4fee60f3064778be369aa Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Thu, 12 Jul 2012 22:10:17 +0200 Subject: Search for char instead of 1 char long string, when possible. It is faster and even avoid memory allocation somtimes. Change-Id: Ic12ff70e95953de44ef5798131150669d07a5445 --- l10ntools/source/export.cxx | 4 ++-- l10ntools/source/merge.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 398083600334..065d7b743159 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -1285,7 +1285,7 @@ rtl::OString Export::GetText(const rtl::OString &rSource, int nToken) case TEXTLINE: case LONGTEXTLINE: { - rtl::OString sTmp(rSource.copy(rSource.indexOf("="))); + rtl::OString sTmp(rSource.copy(rSource.indexOf('='))); CleanValue( sTmp ); sTmp = sTmp.replaceAll("\n", rtl::OString()). replaceAll("\r", rtl::OString()). @@ -1547,7 +1547,7 @@ sal_Bool Export::PrepareTextToMerge(rtl::OString &rText, sal_uInt16 nTyp, case STRING_TYP_QUICKHELPTEXT : case STRING_TYP_TITLE : { - nStart = rText.indexOf( "=" ); + nStart = rText.indexOf( '=' ); if ( nStart == -1 ) { rText = sOrigText; return sal_False; diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index 9fe265639bff..b77e86b80a46 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -41,8 +41,8 @@ namespace { return rFilename.copy( std::max( - rFilename.lastIndexOf( "\\" ), - rFilename.lastIndexOf( "/" ))+1); + rFilename.lastIndexOf( '\\' ), + rFilename.lastIndexOf( '/' ))+1); }; } -- cgit v1.2.3