diff options
Diffstat (limited to 'libbrep')
-rw-r--r-- | libbrep/common.hxx | 2 | ||||
-rwxr-xr-x | libbrep/odb.sh | 5 | ||||
-rw-r--r-- | libbrep/package.cxx | 4 | ||||
-rw-r--r-- | libbrep/package.hxx | 8 | ||||
-rw-r--r-- | libbrep/types.hxx | 2 |
5 files changed, 14 insertions, 7 deletions
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<build_class_expr>; + using build_class_exprs = small_vector<build_class_expr, 1>; #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 <libbutl/small-vector-odb.hxx>' \ --odb-epilogue '#include <libbrep/wrapper-traits.hxx>' \ + --hxx-prologue '#include <libbutl/small-vector-odb.hxx>' \ --hxx-prologue '#include <libbrep/wrapper-traits.hxx>' \ --hxx-prologue '#include <libbrep/common-traits.hxx>' \ -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 <libbutl/small-vector-odb.hxx>' \ --odb-epilogue '#include <libbrep/wrapper-traits.hxx>' \ --hxx-prologue '#include <libbrep/package-traits.hxx>' \ --generate-prepared -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2 \ @@ -65,6 +68,7 @@ xxd -i <package-extra.sql >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 <libbutl/small-vector-odb.hxx>' \ --odb-epilogue '#include <libbrep/wrapper-traits.hxx>' \ --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 <libbutl/small-vector-odb.hxx>' \ --odb-epilogue '#include <libbrep/wrapper-traits.hxx>' \ --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<string, 5> tp, + small_vector<string, 5> kw, optional<string> ds, optional<text_type> 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<string, 5> topics, + small_vector<string, 5> keywords, optional<string> description, optional<text_type> 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<string, 5> topics; + small_vector<string, 5> keywords; optional<string> description; // Absent if type is unknown. optional<text_type> 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 <libbutl/path-io.mxx> #include <libbutl/optional.mxx> #include <libbutl/timestamp.mxx> +#include <libbutl/small-vector.mxx> namespace brep { @@ -49,6 +50,7 @@ namespace brep using std::weak_ptr; using std::vector; + using butl::small_vector; // <libbutl/small-vector.mxx> using strings = vector<string>; using cstrings = vector<const char*>; |