SystemMonitor: Fix building with clang

This commit is contained in:
joshua stein 2020-01-30 21:41:37 -06:00 committed by Andreas Kling
parent dab78c90f3
commit 8919b61784
Notes: sideshowbarker 2024-07-19 09:37:17 +09:00

View File

@ -158,11 +158,11 @@ void DevicesModel::update()
}
if (!S_ISBLK(statbuf.st_mode) && !S_ISCHR(statbuf.st_mode))
continue;
unsigned major = ::major(statbuf.st_rdev);
unsigned minor = ::minor(statbuf.st_rdev);
unsigned _major = major(statbuf.st_rdev);
unsigned _minor = minor(statbuf.st_rdev);
auto it = m_devices.find([major, minor](auto& device_info) {
return device_info.major == major && device_info.minor == minor;
auto it = m_devices.find([_major, _minor](auto& device_info) {
return device_info.major == _major && device_info.minor == _minor;
});
if (it != m_devices.end()) {
(*it).path = move(path);