summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-05 11:32:52 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 12:58:12 +0200
commitef90021abe3735fba57145598fd7c3d359d2718e (patch)
tree9da3ef32700774f56e0225ea28f3bc4ceaffe80c /odk
parent0a9ef5a18e148c7a5c9a088e153a7873d1564841 (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 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
index de7fbe29e7b6..3d6a5ef16d59 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
@@ -102,28 +102,28 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
const PropertyValue *pEnd = pBegin + info.getLength();
for(;pBegin != pEnd;++pBegin)
{
- if(!pBegin->Name.compareToAscii(pTimeout))
+ if(pBegin->Name.equalsAscii(pTimeout))
pBegin->Value >>= nTimeout;
- else if(!pBegin->Name.compareToAscii(pSilent))
+ else if(pBegin->Name.equalsAscii(pSilent))
pBegin->Value >>= bSilent;
- else if(!pBegin->Name.compareToAscii(pUser))
+ else if(pBegin->Name.equalsAscii(pUser))
{
pBegin->Value >>= aUID;
- aDSN = aDSN + ::rtl::OUString(";UID=") + aUID;
+ aDSN = aDSN + ";UID=" + aUID;
}
- else if(!pBegin->Name.compareToAscii(pPwd))
+ else if(pBegin->Name.equalsAscii(pPwd))
{
pBegin->Value >>= aPWD;
- aDSN = aDSN + ::rtl::OUString(";PWD=") + aPWD;
+ aDSN = aDSN + ";PWD=" + aPWD;
}
- else if(!pBegin->Name.compareToAscii(pUseCatalog))
+ else if(pBegin->Name.equalsAscii(pUseCatalog))
{
pBegin->Value >>= m_bUseCatalog;
}
- else if(!pBegin->Name.compareToAscii(pSysDrv))
+ else if(pBegin->Name.equalsAscii(pSysDrv))
{
pBegin->Value >>= aSysDrvSettings;
- aDSN += ::rtl::OUString(";");
+ aDSN += ";";
aDSN += aSysDrvSettings;
}
}