haze: move static_assert to requires, fix alignment

This commit is contained in:
Liam 2023-04-17 16:07:32 -04:00
commit 1741004f19
2 changed files with 2 additions and 3 deletions

View file

@ -40,9 +40,8 @@ namespace haze {
void SetResult(Result r) { m_result = r; } void SetResult(Result r) { m_result = r; }
Result GetResult() const { return m_result; } Result GetResult() const { return m_result; }
public: public:
template <typename... Args> template <typename... Args> requires (sizeof...(Args) > 0)
Result WaitFor(s32 *out_arg_waiter, Args &&... arg_waiters) { Result WaitFor(s32 *out_arg_waiter, Args &&... arg_waiters) {
static_assert(sizeof...(Args) > 0);
const Waiter arg_waiter_array[] = { arg_waiters... }; const Waiter arg_waiter_array[] = { arg_waiters... };
return this->WaitForImpl(out_arg_waiter, arg_waiter_array, sizeof...(Args)); return this->WaitForImpl(out_arg_waiter, arg_waiter_array, sizeof...(Args));
} }

View file

@ -139,7 +139,7 @@ namespace haze {
R_TRY(usbDsInterface_AppendConfigurationData(m_interface, UsbDeviceSpeed_High, std::addressof(endpoint_descriptor_interrupt), USB_DT_ENDPOINT_SIZE)); R_TRY(usbDsInterface_AppendConfigurationData(m_interface, UsbDeviceSpeed_High, std::addressof(endpoint_descriptor_interrupt), USB_DT_ENDPOINT_SIZE));
/* Super speed config. */ /* Super speed config. */
endpoint_descriptor_in.wMaxPacketSize = PtpUsbBulkSuperSpeedMaxPacketLength; endpoint_descriptor_in.wMaxPacketSize = PtpUsbBulkSuperSpeedMaxPacketLength;
endpoint_descriptor_out.wMaxPacketSize = PtpUsbBulkSuperSpeedMaxPacketLength; endpoint_descriptor_out.wMaxPacketSize = PtpUsbBulkSuperSpeedMaxPacketLength;
R_TRY(usbDsInterface_AppendConfigurationData(m_interface, UsbDeviceSpeed_Super, std::addressof(interface_descriptor), USB_DT_INTERFACE_SIZE)); R_TRY(usbDsInterface_AppendConfigurationData(m_interface, UsbDeviceSpeed_Super, std::addressof(interface_descriptor), USB_DT_INTERFACE_SIZE));
R_TRY(usbDsInterface_AppendConfigurationData(m_interface, UsbDeviceSpeed_Super, std::addressof(endpoint_descriptor_in), USB_DT_ENDPOINT_SIZE)); R_TRY(usbDsInterface_AppendConfigurationData(m_interface, UsbDeviceSpeed_Super, std::addressof(endpoint_descriptor_in), USB_DT_ENDPOINT_SIZE));