mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 04:54:58 +00:00
Kernel/PCI: Prefer structured bindings when iterating over HashMaps
This makes `Access::rescan_hardware` look a bit nicer.
This commit is contained in:
parent
2537efaf64
commit
b0fc5bea91
1 changed files with 2 additions and 2 deletions
|
@ -162,8 +162,8 @@ UNMAP_AFTER_INIT void Access::rescan_hardware()
|
||||||
SpinlockLocker scan_locker(m_scan_lock);
|
SpinlockLocker scan_locker(m_scan_lock);
|
||||||
VERIFY(m_device_identifiers.is_empty());
|
VERIFY(m_device_identifiers.is_empty());
|
||||||
ErrorOr<void> error_or_void {};
|
ErrorOr<void> error_or_void {};
|
||||||
for (auto it = m_host_controllers.begin(); it != m_host_controllers.end(); ++it) {
|
for (auto& [_, host_controller] : m_host_controllers) {
|
||||||
(*it).value->enumerate_attached_devices([this, &error_or_void](EnumerableDeviceIdentifier device_identifier) -> IterationDecision {
|
host_controller->enumerate_attached_devices([this, &error_or_void](EnumerableDeviceIdentifier device_identifier) -> IterationDecision {
|
||||||
auto device_identifier_or_error = DeviceIdentifier::from_enumerable_identifier(device_identifier);
|
auto device_identifier_or_error = DeviceIdentifier::from_enumerable_identifier(device_identifier);
|
||||||
if (device_identifier_or_error.is_error()) {
|
if (device_identifier_or_error.is_error()) {
|
||||||
error_or_void = device_identifier_or_error.release_error();
|
error_or_void = device_identifier_or_error.release_error();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue