[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

@@ -68,7 +68,8 @@ void NetworkTablesProvider::DisplayMenu() {
wpi::SmallString<64> name;
for (auto&& entry : m_viewEntries) {
path.clear();
wpi::split(entry->name, path, '/', -1, false);
wpi::split(entry->name, '/', -1, false,
[&](auto name) { path.emplace_back(name); });
bool fullDepth = true;
int depth = 0;