diff options
author | David Tardon <dtardon@redhat.com> | 2010-11-16 10:16:41 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-16 11:58:25 +0100 |
commit | 2fc9ec4b71054138c17168fe15b61fb4c3390502 (patch) | |
tree | c0fc43b7c4d41f43353a732779e659de29cdb03e /desktop/source/deployment/misc | |
parent | 29a75314eded91fd1c4441d71061f9f9441d443e (diff) |
simplify a bit
Diffstat (limited to 'desktop/source/deployment/misc')
-rw-r--r-- | desktop/source/deployment/misc/dp_update.cxx | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 688389df529d..8eedd0955e32 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -203,17 +203,12 @@ bool onlyBundledExtensions( if (extensionList) { typedef std::vector<Reference<deployment::XPackage > >::const_iterator CIT; - for (CIT i = extensionList->begin(); i != extensionList->end(); i++) + for (CIT i(extensionList->begin()), aEnd(extensionList->end()); onlyBundled && i != aEnd; ++i) { Sequence<Reference<deployment::XPackage> > seqExt = xExtMgr->getExtensionsWithSameIdentifier( dp_misc::getIdentifier(*i), (*i)->getName(), Reference<ucb::XCommandEnvironment>()); - if (!containsBundledOnly(seqExt)) - { - onlyBundled = false; - break; - } - + onlyBundled = containsBundledOnly(seqExt); } } else @@ -221,13 +216,9 @@ bool onlyBundledExtensions( const uno::Sequence< uno::Sequence< Reference<deployment::XPackage > > > seqAllExt = xExtMgr->getAllExtensions(Reference<task::XAbortChannel>(), Reference<ucb::XCommandEnvironment>()); - for (int pos = seqAllExt.getLength(); pos --; ) + for (int pos(0), nLen(seqAllExt.getLength()); onlyBundled && pos != nLen; ++pos) { - if (!containsBundledOnly(seqAllExt[pos])) - { - onlyBundled = false; - break; - } + onlyBundled = containsBundledOnly(seqAllExt[pos]); } } return onlyBundled; |