From bf452cbc2ae2b209ec262ce858deca470d086f24 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 25 May 2020 15:54:14 +0100 Subject: refactor(3p/nix): Replace tokenizeStrings with absl::StrSplit This function was a custom (and inefficient in the case of single-character delimiters) string splitter which was used all over the codebase. Abseil provides an appropriate replacement function. --- third_party/nix/src/nix-daemon/nix-daemon.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party/nix/src/nix-daemon') diff --git a/third_party/nix/src/nix-daemon/nix-daemon.cc b/third_party/nix/src/nix-daemon/nix-daemon.cc index 5b62d67dbe1c..4373c33e8b4d 100644 --- a/third_party/nix/src/nix-daemon/nix-daemon.cc +++ b/third_party/nix/src/nix-daemon/nix-daemon.cc @@ -526,7 +526,7 @@ static void performOp(TunnelLogger* logger, const ref& store, trusted.insert(s); } Strings subs; - auto ss = tokenizeString(value); + Strings ss = absl::StrSplit(value, absl::ByAnyChar(" \t\n\r")); for (auto& s : ss) { if (trusted.count(s) != 0u) { subs.push_back(s); -- cgit 1.4.1