diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-05-06 16:46:51 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-05-20 14:18:36 +0200 |
commit | 6dcae298f972eb20223838f0e1dc376c44bc9cc3 (patch) | |
tree | 2906652b0ed9f08dd5ab7473b475afda975bda72 /cmdline | |
parent | 43c71fad3a51d841132ba15a7a5930e1ee4126ed (diff) |
edsp: use a limited scenario based on bool-array
Its more space and runtime efficient to use a boolean set instead of a
CacheSet-based implementation.
Git-Dch: Ignore
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-internal-solver.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc index fa54657c0..12f4d6f93 100644 --- a/cmdline/apt-internal-solver.cc +++ b/cmdline/apt-internal-solver.cc @@ -88,7 +88,12 @@ int main(int argc,const char *argv[]) /*{{{*/ if (pkgset.empty() == true) EDSP::WriteScenario(CacheFile, output); else - EDSP::WriteLimitedScenario(CacheFile, output, pkgset); + { + std::vector<bool> pkgvec(CacheFile->Head().PackageCount, false); + for (auto const &p: pkgset) + pkgvec[p->ID] = true; + EDSP::WriteLimitedScenario(CacheFile, output, pkgvec); + } output.Close(); _error->DumpErrors(std::cerr); return 0; |