diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-12-14 14:18:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-12-14 14:18:44 +0200 |
commit | 0aa7a94e1032a96a2a72cb6a82824f9fe970d412 (patch) | |
tree | 412ab1e9da30c708b616ae6fda1663b8169fc55c /libbuild2/config/operation.cxx | |
parent | 218a739b33325c5dd6baa5cf6291dad849ad2441 (diff) |
Improve empty simple value to empty list of names reduction heuristics
Specifically, do not reduce typed RHS empty simple values for prepend/append
and additionally for assignment provided LHS is typed and is a container.
Diffstat (limited to 'libbuild2/config/operation.cxx')
-rw-r--r-- | libbuild2/config/operation.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx index 34ed402..9079bbf 100644 --- a/libbuild2/config/operation.cxx +++ b/libbuild2/config/operation.cxx @@ -181,7 +181,7 @@ namespace build2 if (v) { storage.clear (); - dr << "'" << reverse (v, storage) << "'"; + dr << "'" << reverse (v, storage, true /* reduce */) << "'"; } else dr << "[null]"; @@ -531,7 +531,7 @@ namespace build2 pair<names_view, const char*> p ( sv.save != nullptr ? sv.save (v, base, storage) - : make_pair (reverse (v, storage), "=")); + : make_pair (reverse (v, storage, true /* reduce */), "=")); // Might becomes empty after a custom save function had at it. // |