From 54bf5ba4227a234f8cd5102634b9a3b535e6fbdb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Dec 2019 19:11:47 +0100 Subject: nix-store -r: Handle symlinks to store paths Fixes #3270. --- src/libutil/util.cc | 8 ++++---- src/libutil/util.hh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libutil') 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 C tokenizeString(const string & s, const string & separators) +template 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 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 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 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 C tokenizeString(const string & s, const string & separators = " \t\n\r"); +template C tokenizeString(std::string_view s, const string & separators = " \t\n\r"); /* Concatenate the given strings with a separator between the -- cgit v1.2.3