summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-05 11:06:18 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 12:58:12 +0200
commit0a9ef5a18e148c7a5c9a088e153a7873d1564841 (patch)
tree3c3bc21e7ee4f836a1d056695175e0b1a91eda26 /pyuno
parent7944301424aac0943e4ecc0410f495b210ad3b79 (diff)
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
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno_adapter.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index 41a2e242aad1..9b79492826d2 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -184,7 +184,7 @@ Any Adapter::invoke( const OUString &aFunctionName,
// special hack for the uno object identity concept. The XUnoTunnel.getSomething() call is
// always handled by the adapter directly.
- if( aParams.getLength() == 1 && 0 == aFunctionName.compareToAscii( "getSomething" ) )
+ if( aParams.getLength() == 1 && aFunctionName.equalsAscii( "getSomething" ) )
{
Sequence< sal_Int8 > id;
if( aParams[0] >>= id )
@@ -246,8 +246,8 @@ Any Adapter::invoke( const OUString &aFunctionName,
if( ret.hasValue() &&
ret.getValueTypeClass() == com::sun::star::uno::TypeClass_SEQUENCE &&
- 0 != aFunctionName.compareToAscii( "getTypes" ) && // needed by introspection itself !
- 0 != aFunctionName.compareToAscii( "getImplementationId" ) ) // needed by introspection itself !
+ ! aFunctionName.equalsAscii( "getTypes" ) && // needed by introspection itself !
+ ! aFunctionName.equalsAscii( "getImplementationId" ) ) // needed by introspection itself !
{
// the sequence can either be
// 1) a simple sequence return value