diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-03 22:11:02 +0300 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-05-17 11:20:15 +0200 |
commit | 0e4c542f7a862e681baf25f042bc3a928c14004f (patch) | |
tree | 56582ddb40671a22eaaa54e1ab3058dc553b9d5d /linguistic/source/hyphdsp.cxx | |
parent | 644ca26af744aec1e66c8dd4199d1228e0f780be (diff) |
Use hasElements to check Sequence emptiness in [l-r]*
Similar to clang-tidy readability-container-size-empty
Change-Id: Idd67f332b04857a39df26bad1733aae21236f105
Reviewed-on: https://gerrit.libreoffice.org/71764
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'linguistic/source/hyphdsp.cxx')
-rw-r--r-- | linguistic/source/hyphdsp.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index 38cd240c2b76..fa0a77ff20a5 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -328,13 +328,13 @@ Reference< XHyphenatedWord > SAL_CALL } else { - sal_Int32 nLen = pEntry->aSvcImplNames.getLength() > 0 ? 1 : 0; + sal_Int32 nLen = pEntry->aSvcImplNames.hasElements() ? 1 : 0; DBG_ASSERT( pEntry->nLastTriedSvcIndex < nLen, "lng : index out of range"); sal_Int32 i = 0; Reference< XHyphenator > xHyph; - if (pEntry->aSvcRefs.getLength() > 0) + if (pEntry->aSvcRefs.hasElements()) xHyph = pEntry->aSvcRefs[0]; // try already instantiated service @@ -460,13 +460,13 @@ Reference< XHyphenatedWord > SAL_CALL } else { - sal_Int32 nLen = pEntry->aSvcImplNames.getLength() > 0 ? 1 : 0; + sal_Int32 nLen = pEntry->aSvcImplNames.hasElements() ? 1 : 0; DBG_ASSERT( pEntry->nLastTriedSvcIndex < nLen, "lng : index out of range"); sal_Int32 i = 0; Reference< XHyphenator > xHyph; - if (pEntry->aSvcRefs.getLength() > 0) + if (pEntry->aSvcRefs.hasElements()) xHyph = pEntry->aSvcRefs[0]; // try already instantiated service @@ -582,13 +582,13 @@ Reference< XPossibleHyphens > SAL_CALL } else { - sal_Int32 nLen = pEntry->aSvcImplNames.getLength() > 0 ? 1 : 0; + sal_Int32 nLen = pEntry->aSvcImplNames.hasElements() ? 1 : 0; DBG_ASSERT( pEntry->nLastTriedSvcIndex < nLen, "lng : index out of range"); sal_Int32 i = 0; Reference< XHyphenator > xHyph; - if (pEntry->aSvcRefs.getLength() > 0) + if (pEntry->aSvcRefs.hasElements()) xHyph = pEntry->aSvcRefs[0]; // try already instantiated service @@ -700,7 +700,7 @@ Sequence< OUString > if (pEntry) { aRes = pEntry->aSvcImplNames; - if (aRes.getLength() > 0) + if (aRes.hasElements()) aRes.realloc(1); } |