[Libreoffice-commits] core.git: xmlsecurity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Jan 13 10:01:02 UTC 2019
xmlsecurity/source/helper/documentsignaturehelper.cxx | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
New commits:
commit c7e7146e2bb81e18753becaf6ca363d3d9dedeba
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sat Dec 29 23:32:51 2018 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sun Jan 13 11:00:40 2019 +0100
Avoid OUString temporaries, simplify
Change-Id: I85b3cc9684673a204c3bf7428940d8efb8082fb6
Reviewed-on: https://gerrit.libreoffice.org/66223
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
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;
More information about the Libreoffice-commits
mailing list