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/libstore/nar-info.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'third_party/nix/src/libstore/nar-info.cc') diff --git a/third_party/nix/src/libstore/nar-info.cc b/third_party/nix/src/libstore/nar-info.cc index 9f4c53e19b59..1dc0b54cf1e6 100644 --- a/third_party/nix/src/libstore/nar-info.cc +++ b/third_party/nix/src/libstore/nar-info.cc @@ -1,6 +1,7 @@ #include "nar-info.hh" #include +#include #include "globals.hh" @@ -59,7 +60,7 @@ NarInfo::NarInfo(const Store& store, const std::string& s, corrupt(); } } else if (name == "References") { - auto refs = tokenizeString(value, " "); + std::vector refs = absl::StrSplit(value, absl::ByChar(' ')); if (!references.empty()) { corrupt(); } -- cgit 1.4.1