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:
parent
b99b368d17
commit
bf452cbc2a
29 changed files with 146 additions and 145 deletions
2
third_party/nix/src/nix-daemon/nix-daemon.cc
vendored
2
third_party/nix/src/nix-daemon/nix-daemon.cc
vendored
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue