diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-12-29 23:32:51 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-13 11:00:40 +0100 |
commit | c7e7146e2bb81e18753becaf6ca363d3d9dedeba (patch) | |
tree | b137f53b02aec88a39a26d9179a6b7fe88bd428c /xmlsecurity/source/helper | |
parent | 577dbcf52108c37b266557079bab74691cd23fa1 (diff) |
Avoid OUString temporaries, simplify
Change-Id: I85b3cc9684673a204c3bf7428940d8efb8082fb6
Reviewed-on: https://gerrit.libreoffice.org/66223
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'xmlsecurity/source/helper')
-rw-r--r-- | xmlsecurity/source/helper/documentsignaturehelper.cxx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx index 1dda0be4d7f5..0b197abc8efe 100644 --- a/xmlsecurity/source/helper/documentsignaturehelper.cxx +++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx @@ -458,22 +458,12 @@ bool DocumentSignatureHelper::equalsReferenceUriManifestPath( { //split up the uri and path into segments. Both are separated by '/' std::vector<OUString> vUriSegments; - sal_Int32 nIndex = 0; - do - { - OUString aToken = rUri.getToken( 0, '/', nIndex ); - vUriSegments.push_back(aToken); - } - while (nIndex >= 0); + for (sal_Int32 nIndex = 0; nIndex >= 0; ) + vUriSegments.push_back(rUri.getToken( 0, '/', nIndex )); std::vector<OUString> vPathSegments; - nIndex = 0; - do - { - OUString aToken = rPath.getToken( 0, '/', nIndex ); - vPathSegments.push_back(aToken); - } - while (nIndex >= 0); + for (sal_Int32 nIndex = 0; nIndex >= 0; ) + vPathSegments.push_back(rPath.getToken( 0, '/', nIndex )); if (vUriSegments.size() != vPathSegments.size()) return false; |