aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-04-21 10:35:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-04-22 09:02:03 +0200
commit1ac5458eede2b4b2d3bc98cde787348f70328361 (patch)
tree031115d69cc8db08ada7735966bb88d09e3716df /libbuild2/utility.ixx
parent35c1c44bc5f75a327f5d879373a9683af2072a1a (diff)
Add another hash/save_environment() overload
Diffstat (limited to 'libbuild2/utility.ixx')
-rw-r--r--libbuild2/utility.ixx15
1 files changed, 15 insertions, 0 deletions
diff --git a/libbuild2/utility.ixx b/libbuild2/utility.ixx
index 3f9d34b..aedfc94 100644
--- a/libbuild2/utility.ixx
+++ b/libbuild2/utility.ixx
@@ -274,6 +274,21 @@ namespace build2
}
inline void
+ hash_environment (sha256& cs, const cstrings& ns)
+ {
+ for (const char* n: ns)
+ hash_environment (cs, n);
+ }
+
+ inline string
+ hash_environment (const cstrings& ns)
+ {
+ sha256 cs;
+ hash_environment (cs, ns);
+ return cs.string ();
+ }
+
+ inline void
hash_environment (sha256& cs, const strings& ns)
{
for (const string& n: ns)