From 0a9ef5a18e148c7a5c9a088e153a7873d1564841 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 5 Nov 2013 11:06:18 +0200 Subject: convert OUString 0==compareToAscii to equalsAscii Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07 --- unotools/source/config/lingucfg.cxx | 4 ++-- unotools/source/ucbhelper/tempfile.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 0f0344a50b49..066697291c91 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -290,7 +290,7 @@ sal_Bool SvtLinguConfigItem::GetHdlByName( { while (pEntry && pEntry->pFullPropName != NULL) { - if (0 == rPropertyName.compareToAscii( pEntry->pFullPropName )) + if (rPropertyName.equalsAscii( pEntry->pFullPropName )) { rnHdl = pEntry->nHdl; break; @@ -303,7 +303,7 @@ sal_Bool SvtLinguConfigItem::GetHdlByName( { while (pEntry && pEntry->pPropName != NULL) { - if (0 == rPropertyName.compareToAscii( pEntry->pPropName )) + if (rPropertyName.equalsAscii( pEntry->pPropName )) { rnHdl = pEntry->nHdl; break; diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 0ffae6db625a..86438df125c6 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -67,7 +67,7 @@ OUString getParentName( const OUString& aFileName ) if( aParent.endsWith(":") && aParent.getLength() == 6 ) aParent += "/"; - if( 0 == aParent.compareToAscii( "file://" ) ) + if( aParent.equalsAscii( "file://" ) ) aParent = "file:///"; return aParent; -- cgit