mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01: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:
@@ -317,7 +317,7 @@ HAL_SimDeviceHandle SimDeviceData::GetDeviceHandle(const char* name) {
|
||||
if (it == m_deviceMap.end()) {
|
||||
return 0;
|
||||
}
|
||||
if (auto deviceImpl = it->getValue().lock()) {
|
||||
if (auto deviceImpl = it->second.lock()) {
|
||||
return deviceImpl->handle;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -459,10 +459,10 @@ HAL_SimValueHandle SimDeviceData::GetValueHandle(HAL_SimDeviceHandle device,
|
||||
if (it == deviceImpl->valueMap.end()) {
|
||||
return 0;
|
||||
}
|
||||
if (!it->getValue()) {
|
||||
if (!it->second) {
|
||||
return 0;
|
||||
}
|
||||
return it->getValue()->handle;
|
||||
return it->second->handle;
|
||||
}
|
||||
|
||||
void SimDeviceData::EnumerateValues(HAL_SimDeviceHandle device, void* param,
|
||||
|
||||
Reference in New Issue
Block a user