summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-05 14:39:55 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 12:58:13 +0200
commitfcd1637d5101b9142e6808edfb77b01122857901 (patch)
tree5fd09f97de80cf2a9481bd55a798015db35f1d0c /connectivity
parentef90021abe3735fba57145598fd7c3d359d2718e (diff)
convert OUString compareToAscii == 0 to equalsAscii
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/cpool/Zregistration.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx2
-rw-r--r--connectivity/source/drivers/mork/MDriver.cxx4
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx4
-rw-r--r--connectivity/source/drivers/mozab/MDriver.cxx2
-rw-r--r--connectivity/source/drivers/mozab/MResultSet.cxx4
-rw-r--r--connectivity/source/manager/mregistration.cxx2
7 files changed, 10 insertions, 10 deletions
diff --git a/connectivity/source/cpool/Zregistration.cxx b/connectivity/source/cpool/Zregistration.cxx
index 68039800a4d9..3d3d657d272a 100644
--- a/connectivity/source/cpool/Zregistration.cxx
+++ b/connectivity/source/cpool/Zregistration.cxx
@@ -38,7 +38,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbpool2_component_getFactory(const sal_Char*
{
void* pRet = NULL;
- if (OPoolCollection::getImplementationName_Static().compareToAscii(_pImplName) == 0)
+ if (OPoolCollection::getImplementationName_Static().equalsAscii(_pImplName))
{
Reference< XSingleServiceFactory > xFactory(
::cppu::createOneInstanceFactory(
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index 6d4577c40256..40e9a8237fc3 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -173,7 +173,7 @@ namespace connectivity { namespace hsqldb
const PropertyValue* pEnd = pIter + aInfo.getLength();
for(;pIter != pEnd;++pIter)
{
- if ( pIter->Name.compareToAscii("readonly") == 0 )
+ if ( pIter->Name.equalsAscii("readonly") )
m_bReadOnly = true;
}
}
diff --git a/connectivity/source/drivers/mork/MDriver.cxx b/connectivity/source/drivers/mork/MDriver.cxx
index 1a70ed251048..851e18e9a902 100644
--- a/connectivity/source/drivers/mork/MDriver.cxx
+++ b/connectivity/source/drivers/mork/MDriver.cxx
@@ -118,8 +118,8 @@ sal_Bool MorkDriver::acceptsURL(OUString const & url)
aAddrbookScheme = aAddrbookURI.copy(0, nLen);
}
- if ((aAddrbookScheme.compareToAscii( "thunderbird" ) == 0) ||
- (aAddrbookScheme.compareToAscii( "mozilla" ) == 0))
+ if (aAddrbookScheme.equalsAscii( "thunderbird" ) ||
+ aAddrbookScheme.equalsAscii( "mozilla" ) )
{
return true;
}
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 163054e46110..99f7275559a8 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -875,8 +875,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
matchString = parseTree->getChild(2)->getTokenValue();
}
- if ( columnName.compareToAscii("0") ==0 && op == MQueryOp::Is &&
- matchString.compareToAscii("1") == 0 ) {
+ if ( columnName.equalsAscii("0") && op == MQueryOp::Is &&
+ matchString.equalsAscii("1") ) {
OSL_TRACE("Query always evaluates to FALSE");
m_bIsAlwaysFalseQuery = sal_True;
}
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index 766d251468c9..8d789380a255 100644
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -245,7 +245,7 @@ EDriverType MozabDriver::impl_classifyURL( const OUString& url )
for ( size_t i=0; i < sizeof( aSchemeMap ) / sizeof( aSchemeMap[0] ); ++i )
{
- if ( aAddrbookScheme.compareToAscii( aSchemeMap[i].pScheme ) == 0 )
+ if ( aAddrbookScheme.equalsAscii( aSchemeMap[i].pScheme ) )
return aSchemeMap[i].eType;
}
diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx
index 13ce879b32c2..d0e449e4be7a 100644
--- a/connectivity/source/drivers/mozab/MResultSet.cxx
+++ b/connectivity/source/drivers/mozab/MResultSet.cxx
@@ -857,8 +857,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
matchString = parseTree->getChild(2)->getTokenValue();
}
- if ( columnName.compareToAscii("0") ==0 && op == MQueryOp::Is &&
- matchString.compareToAscii("1") == 0 ) {
+ if ( columnName.equalsAscii("0") && op == MQueryOp::Is &&
+ matchString.equalsAscii("1") ) {
OSL_TRACE("Query always evaluates to FALSE");
m_bIsAlwaysFalseQuery = sal_True;
}
diff --git a/connectivity/source/manager/mregistration.cxx b/connectivity/source/manager/mregistration.cxx
index af01a22dd2b8..ce712f303eec 100644
--- a/connectivity/source/manager/mregistration.cxx
+++ b/connectivity/source/manager/mregistration.cxx
@@ -38,7 +38,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdbc2_component_getFactory(const sal_Char* _
{
void* pRet = NULL;
- if (::drivermanager::OSDBCDriverManager::getImplementationName_static().compareToAscii(_pImplName) == 0)
+ if (::drivermanager::OSDBCDriverManager::getImplementationName_static().equalsAscii(_pImplName))
{
Reference< XSingleServiceFactory > xFactory(
::cppu::createOneInstanceFactory(