aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-12-16 19:11:47 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-12-16 19:11:47 +0100
commit54bf5ba4227a234f8cd5102634b9a3b535e6fbdb (patch)
tree39878e4f41297705b5a8b637ed094c0998e8eca1 /src/libutil
parent14d82baba4ebb82df28c2d4e9517f8c3a81d8f6c (diff)
nix-store -r: Handle symlinks to store paths
Fixes #3270.
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc8
-rw-r--r--src/libutil/util.hh2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index e67bdcdeb..012f1d071 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1186,7 +1186,7 @@ void _interrupted()
//////////////////////////////////////////////////////////////////////
-template<class C> C tokenizeString(const string & s, const string & separators)
+template<class C> C tokenizeString(std::string_view s, const string & separators)
{
C result;
string::size_type pos = s.find_first_not_of(separators, 0);
@@ -1200,9 +1200,9 @@ template<class C> C tokenizeString(const string & s, const string & separators)
return result;
}
-template Strings tokenizeString(const string & s, const string & separators);
-template StringSet tokenizeString(const string & s, const string & separators);
-template vector<string> tokenizeString(const string & s, const string & separators);
+template Strings tokenizeString(std::string_view s, const string & separators);
+template StringSet tokenizeString(std::string_view s, const string & separators);
+template vector<string> tokenizeString(std::string_view s, const string & separators);
string concatStringsSep(const string & sep, const Strings & ss)
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index abd91b81c..abf1c95d6 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -340,7 +340,7 @@ MakeError(FormatError, Error);
/* String tokenizer. */
-template<class C> C tokenizeString(const string & s, const string & separators = " \t\n\r");
+template<class C> C tokenizeString(std::string_view s, const string & separators = " \t\n\r");
/* Concatenate the given strings with a separator between the