mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] Replace LLVM StringMap impl with std::map
As string_view operations on std::map<std::string> won't be integrated until C++26, placeholder implementations are used which are less efficient in a couple of situations (e.g. insert with hint).
This commit is contained in:
@@ -126,7 +126,7 @@ wpi::Sendable* SmartDashboard::GetData(std::string_view key) {
|
||||
if (it == inst.tablesToData.end()) {
|
||||
throw FRC_MakeError(err::SmartDashboardMissingKey, "{}", key);
|
||||
}
|
||||
return wpi::SendableRegistry::GetSendable(it->getValue());
|
||||
return wpi::SendableRegistry::GetSendable(it->second);
|
||||
}
|
||||
|
||||
bool SmartDashboard::PutBoolean(std::string_view keyName, bool value) {
|
||||
@@ -254,6 +254,6 @@ void SmartDashboard::UpdateValues() {
|
||||
inst.listenerExecutor.RunListenerTasks();
|
||||
std::scoped_lock lock(inst.tablesToDataMutex);
|
||||
for (auto& i : inst.tablesToData) {
|
||||
wpi::SendableRegistry::Update(i.getValue());
|
||||
wpi::SendableRegistry::Update(i.second);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user