Replace list by vector in components (configmgr)
Change-Id: I772b9b1b1d8fdbbc1dc7e38904490a6533686a90 Reviewed-on: https://gerrit.libreoffice.org/43353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <list>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include <com/sun/star/beans/Optional.hpp>
|
#include <com/sun/star/beans/Optional.hpp>
|
||||||
@@ -79,17 +79,17 @@ namespace configmgr {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
struct UnresolvedListItem {
|
struct UnresolvedVectorItem {
|
||||||
OUString name;
|
OUString name;
|
||||||
rtl::Reference< ParseManager > manager;
|
rtl::Reference< ParseManager > manager;
|
||||||
|
|
||||||
UnresolvedListItem(
|
UnresolvedVectorItem(
|
||||||
OUString const & theName,
|
OUString const & theName,
|
||||||
rtl::Reference< ParseManager > const & theManager):
|
rtl::Reference< ParseManager > const & theManager):
|
||||||
name(theName), manager(theManager) {}
|
name(theName), manager(theManager) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::list< UnresolvedListItem > UnresolvedList;
|
typedef std::vector< UnresolvedVectorItem > UnresolvedVector;
|
||||||
|
|
||||||
void parseXcsFile(
|
void parseXcsFile(
|
||||||
OUString const & url, int layer, Data & data, Partial const * partial,
|
OUString const & url, int layer, Data & data, Partial const * partial,
|
||||||
@@ -750,7 +750,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
|
|||||||
throw css::uno::RuntimeException(
|
throw css::uno::RuntimeException(
|
||||||
"cannot open directory " + url);
|
"cannot open directory " + url);
|
||||||
}
|
}
|
||||||
UnresolvedList unres;
|
UnresolvedVector unres;
|
||||||
std::set< OUString > existingDeps;
|
std::set< OUString > existingDeps;
|
||||||
std::set< OUString > processedDeps;
|
std::set< OUString > processedDeps;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@@ -794,7 +794,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
|
|||||||
}
|
}
|
||||||
while (!unres.empty()) {
|
while (!unres.empty()) {
|
||||||
bool isResolved = false;
|
bool isResolved = false;
|
||||||
for (UnresolvedList::iterator i(unres.begin()); i != unres.end();) {
|
for (UnresolvedVector::iterator i(unres.begin()); i != unres.end();) {
|
||||||
if (i->manager->parse(&existingDeps)) {
|
if (i->manager->parse(&existingDeps)) {
|
||||||
processedDeps.insert(i->name);
|
processedDeps.insert(i->name);
|
||||||
i = unres.erase(i);
|
i = unres.erase(i);
|
||||||
|
Reference in New Issue
Block a user