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.
This commit is contained in:
Vincent Ambo 2020-05-25 15:54:14 +01:00
parent b99b368d17
commit bf452cbc2a
29 changed files with 146 additions and 145 deletions

View file

@ -526,7 +526,7 @@ static void performOp(TunnelLogger* logger, const ref<Store>& store,
trusted.insert(s);
}
Strings subs;
auto ss = tokenizeString<Strings>(value);
Strings ss = absl::StrSplit(value, absl::ByAnyChar(" \t\n\r"));
for (auto& s : ss) {
if (trusted.count(s) != 0u) {
subs.push_back(s);