diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-05 11:32:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 12:58:12 +0200 |
commit | ef90021abe3735fba57145598fd7c3d359d2718e (patch) | |
tree | 9da3ef32700774f56e0225ea28f3bc4ceaffe80c /mysqlc | |
parent | 0a9ef5a18e148c7a5c9a088e153a7873d1564841 (diff) |
convert OUString !compareToAscii to equalsAscii
Convert code like
if( ! aStr.compareToAscii("XXX") )
to
if( aStr.equalsAscii("XXX") )
which is both clearer and faster.
Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
Diffstat (limited to 'mysqlc')
-rw-r--r-- | mysqlc/source/mysqlc_connection.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index bd9b1591209c..ede0a638d26f 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -152,19 +152,19 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > m_settings.connectionURL = url; for (;pIter != pEnd;++pIter) { - if (!pIter->Name.compareToAscii("user")) { + if (pIter->Name.equalsAscii("user")) { OSL_VERIFY( pIter->Value >>= aUser ); - } else if (!pIter->Name.compareToAscii("password")) { + } else if (pIter->Name.equalsAscii("password")) { OSL_VERIFY( pIter->Value >>= aPass ); - } else if (!pIter->Name.compareToAscii("LocalSocket")) { + } else if (pIter->Name.equalsAscii("LocalSocket")) { OSL_VERIFY( pIter->Value >>= sUnixSocket ); unixSocketPassed = true; - } else if (!pIter->Name.compareToAscii("NamedPipe")) { + } else if (pIter->Name.equalsAscii("NamedPipe")) { OSL_VERIFY( pIter->Value >>= sNamedPipe ); namedPipePassed = true; - } else if ( !pIter->Name.compareToAscii("PublicConnectionURL")) { + } else if ( pIter->Name.equalsAscii("PublicConnectionURL")) { OSL_VERIFY( pIter->Value >>= m_settings.connectionURL ); - } else if ( !pIter->Name.compareToAscii("NewURL")) { // legacy name for "PublicConnectionURL" + } else if ( pIter->Name.equalsAscii("NewURL")) { // legacy name for "PublicConnectionURL" OSL_VERIFY( pIter->Value >>= m_settings.connectionURL ); } } |