aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbpkg/odb.sh2
-rw-r--r--bpkg/package.hxx4
-rw-r--r--bpkg/rep-remove.cxx2
3 files changed, 5 insertions, 3 deletions
diff --git a/bpkg/odb.sh b/bpkg/odb.sh
index 72753fa..0c8ae1b 100755
--- a/bpkg/odb.sh
+++ b/bpkg/odb.sh
@@ -43,7 +43,9 @@ fi
$odb "${inc[@]}" \
-DLIBODB_BUILD2 -DLIBODB_SQLITE_BUILD2 --generate-schema \
-d sqlite --std c++14 --generate-query \
+ --odb-epilogue '#include <libbutl/small-vector-odb.hxx>' \
--odb-epilogue '#include <bpkg/wrapper-traits.hxx>' \
+ --hxx-prologue '#include <libbutl/small-vector-odb.hxx>' \
--hxx-prologue '#include <bpkg/wrapper-traits.hxx>' \
--hxx-prologue '#include <bpkg/value-traits.hxx>' \
--include-with-brackets --include-prefix bpkg --guard-prefix BPKG \
diff --git a/bpkg/package.hxx b/bpkg/package.hxx
index 9d7cedf..3ac48a6 100644
--- a/bpkg/package.hxx
+++ b/bpkg/package.hxx
@@ -346,7 +346,7 @@ namespace bpkg
lazy_shared_ptr<repository_fragment> fragment;
};
- using fragments_type = std::vector<fragment_type>;
+ using fragments_type = small_vector<fragment_type, 1>;
string name; // Object id (canonical name).
repository_location location;
@@ -459,7 +459,7 @@ namespace bpkg
// that since the package is already in at least fetched state, we
// shouldn't be needing its location.
//
- vector<package_location> locations;
+ small_vector<package_location, 1> locations;
// Package manifest data.
//
diff --git a/bpkg/rep-remove.cxx b/bpkg/rep-remove.cxx
index 60923fa..96e96db 100644
--- a/bpkg/rep-remove.cxx
+++ b/bpkg/rep-remove.cxx
@@ -109,7 +109,7 @@ namespace bpkg
query::repository_fragment::name == fragment_name))
{
const shared_ptr<available_package>& p (rp);
- vector<package_location>& ls (p->locations);
+ small_vector<package_location, 1>& ls (p->locations);
for (auto i (ls.cbegin ()); i != ls.cend (); ++i)
{