hid: avoid direct pointer access of transfer memory objects

This commit is contained in:
Liam
2023-02-24 12:29:55 -05:00
parent ca8a804a3c
commit de4e5db330
20 changed files with 91 additions and 69 deletions

View File

@ -80,7 +80,13 @@ private:
LOG_CRITICAL(Service_IRS, "Invalid index {}", index);
return;
}
processors[index] = std::make_unique<T>(system.HIDCore(), device_state, index);
if constexpr (std::is_constructible_v<T, Core::System&, Core::IrSensor::DeviceFormat&,
std::size_t>) {
processors[index] = std::make_unique<T>(system, device_state, index);
} else {
processors[index] = std::make_unique<T>(system.HIDCore(), device_state, index);
}
}
template <typename T>