From 636d69c1b740d8975bb7c7a3b518c280ac224545 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 16 Jun 2023 18:17:07 +0300 Subject: Add --mask-repository pkg-build option --- bpkg/database.hxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'bpkg/database.hxx') diff --git a/bpkg/database.hxx b/bpkg/database.hxx index 3887d99..7ef2d40 100644 --- a/bpkg/database.hxx +++ b/bpkg/database.hxx @@ -717,9 +717,10 @@ namespace bpkg public small_vector, V>, 16> { public: - using value_type = pair, V>; - using base_type = small_vector; - using iterator = typename base_type::iterator; + using value_type = pair, V>; + using base_type = small_vector; + using iterator = typename base_type::iterator; + using const_iterator = typename base_type::const_iterator; using base_type::begin; using base_type::end; @@ -734,6 +735,16 @@ namespace bpkg }); } + const_iterator + find (database& db) const + { + return find_if (begin (), end (), + [&db] (const value_type& i) -> bool + { + return i.first == db; + }); + } + pair insert (database& db, V&& v) { -- cgit v1.1