aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-remove.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-04-13 23:38:12 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-04-19 19:39:55 +0300
commitf2f08e0758243a820fe47128ffabaa474c0e86e7 (patch)
tree45563c74dbbf7a0f546443b469a23541c9ac9b00 /bpkg/rep-remove.cxx
parente958b63712f9a0ff4b523765d2fe12b58aa97fe0 (diff)
Implement git repository handling transition (phase 0)
Diffstat (limited to 'bpkg/rep-remove.cxx')
-rw-r--r--bpkg/rep-remove.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/bpkg/rep-remove.cxx b/bpkg/rep-remove.cxx
index f161c71..fafe5a8 100644
--- a/bpkg/rep-remove.cxx
+++ b/bpkg/rep-remove.cxx
@@ -82,13 +82,12 @@ namespace bpkg
const shared_ptr<available_package>& p (rp);
vector<package_location>& ls (p->locations);
- for (auto i (ls.cbegin ()), e (ls.cend ()); i != e; ++i)
+ for (auto i (ls.cbegin ()); i != ls.cend (); )
{
if (i->repository.object_id () == name)
- {
- ls.erase (i);
- break;
- }
+ i = ls.erase (i);
+ else
+ ++i;
}
if (ls.empty ())