From 0bbd98cffae9274936a0ac7cc579756182579e4e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 25 Jul 2019 22:22:07 +0300 Subject: Adapt to using butl::small_vector instead of std::vector for some manifest values --- libbrep/common.hxx | 2 +- libbrep/odb.sh | 5 +++++ libbrep/package.cxx | 4 ++-- libbrep/package.hxx | 8 ++++---- libbrep/types.hxx | 2 ++ 5 files changed, 14 insertions(+), 7 deletions(-) (limited to 'libbrep') diff --git a/libbrep/common.hxx b/libbrep/common.hxx index 052aae1..0f92d17 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -270,7 +270,7 @@ namespace brep // build_class_expr // using bpkg::build_class_expr; - using build_class_exprs = vector; + using build_class_exprs = small_vector; #pragma db value(build_class_expr) definition diff --git a/libbrep/odb.sh b/libbrep/odb.sh index e2ba564..4172e67 100755 --- a/libbrep/odb.sh +++ b/libbrep/odb.sh @@ -44,7 +44,9 @@ else fi $odb "${inc[@]}" -d pgsql --std c++14 --generate-query \ + --odb-epilogue '#include ' \ --odb-epilogue '#include ' \ + --hxx-prologue '#include ' \ --hxx-prologue '#include ' \ --hxx-prologue '#include ' \ -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2 \ @@ -54,6 +56,7 @@ $odb "${inc[@]}" -d pgsql --std c++14 --generate-query \ $odb "${inc[@]}" -d pgsql --std c++14 --generate-query --generate-schema \ --schema-format sql --schema-format embedded --schema-name package \ + --odb-epilogue '#include ' \ --odb-epilogue '#include ' \ --hxx-prologue '#include ' \ --generate-prepared -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2 \ @@ -65,6 +68,7 @@ xxd -i package-extra.hxx $odb "${inc[@]}" -d pgsql --std c++14 --generate-query --generate-schema \ --schema-format sql --schema-format embedded --schema-name build \ + --odb-epilogue '#include ' \ --odb-epilogue '#include ' \ --generate-prepared -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2 \ --include-with-brackets --include-prefix libbrep \ @@ -72,6 +76,7 @@ $odb "${inc[@]}" -d pgsql --std c++14 --generate-query --generate-schema \ build.hxx $odb "${inc[@]}" -d pgsql --std c++14 --generate-query \ + --odb-epilogue '#include ' \ --odb-epilogue '#include ' \ --generate-prepared -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2 \ --include-with-brackets --include-prefix libbrep \ diff --git a/libbrep/package.cxx b/libbrep/package.cxx index b17dcc1..fe216d2 100644 --- a/libbrep/package.cxx +++ b/libbrep/package.cxx @@ -57,8 +57,8 @@ namespace brep priority_type pr, string sm, license_alternatives_type la, - strings tp, - strings kw, + small_vector tp, + small_vector kw, optional ds, optional dt, string ch, diff --git a/libbrep/package.hxx b/libbrep/package.hxx index 5e1bebd..69b25b8 100644 --- a/libbrep/package.hxx +++ b/libbrep/package.hxx @@ -373,8 +373,8 @@ namespace brep priority_type, string summary, license_alternatives_type, - strings topics, - strings keywords, + small_vector topics, + small_vector keywords, optional description, optional description_type, string changes, @@ -433,8 +433,8 @@ namespace brep priority_type priority; string summary; license_alternatives_type license_alternatives; - strings topics; - strings keywords; + small_vector topics; + small_vector keywords; optional description; // Absent if type is unknown. optional description_type; // Present if description is present. string changes; diff --git a/libbrep/types.hxx b/libbrep/types.hxx index 2438b80..65c9791 100644 --- a/libbrep/types.hxx +++ b/libbrep/types.hxx @@ -26,6 +26,7 @@ #include #include #include +#include namespace brep { @@ -49,6 +50,7 @@ namespace brep using std::weak_ptr; using std::vector; + using butl::small_vector; // using strings = vector; using cstrings = vector; -- cgit v1.1