[wpiutil] Change StringExtras split() to template (#7636)

It now calls back a function for each part rather than creating a SmallVector.
This commit is contained in:
Peter Johnson
2025-01-05 20:53:43 -08:00
committed by GitHub
parent 0f6693594c
commit 03d9e96877
17 changed files with 161 additions and 171 deletions

View File

@@ -128,7 +128,8 @@ void LogLoader::RebuildEntryTree() {
} else {
parts.emplace_back(prefix);
}
wpi::split(mainpart, parts, '/', -1, false);
wpi::split(mainpart, '/', -1, false,
[&](auto part) { parts.emplace_back(part); });
// ignore a raw "/" key
if (parts.empty()) {