From 1ac5458eede2b4b2d3bc98cde787348f70328361 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Apr 2021 10:35:13 +0200 Subject: Add another hash/save_environment() overload --- libbuild2/utility.ixx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libbuild2/utility.ixx') 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) -- cgit v1.1