diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-17 11:39:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-17 12:44:46 +0200 |
commit | 0b2ddcda730897cb5b2801731f03191d77409273 (patch) | |
tree | 063c9beae80927710fef7ac8b5bc22d458004de9 /unoxml | |
parent | 3cb8e9e211c30089516f56f465176d3a959631f9 (diff) |
loplugin:buriedassign in tools..xmloff
Change-Id: I31df6c4fd82c6f6d15bbe5228e92e5171cacba51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92410
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/rdf/CURI.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx index cef43fa22488..bacc42697e1a 100644 --- a/unoxml/source/rdf/CURI.cxx +++ b/unoxml/source/rdf/CURI.cxx @@ -742,11 +742,13 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArgu } // split parameter - sal_Int32 idx; - if ( ((idx = arg0.indexOf ('#')) < 0) - && ((idx = arg0.lastIndexOf('/')) < 0) - && ((idx = arg0.lastIndexOf(':')) < 0) ) - { + sal_Int32 idx = arg0.indexOf('#'); + if (idx < 0) + idx = arg0.lastIndexOf('/'); + if (idx < 0) + idx = arg0.lastIndexOf(':'); + if (idx < 0) + { throw css::lang::IllegalArgumentException( "CURI::initialize: argument not splittable: no separator [#/:]", *this, 0); } |