Rémi Bernon (@rbernon) commented about dlls/windows.devices.enumeration/main.c:
switch (impl->status) { case DeviceWatcherStatus_Aborted: break;
- case DeviceWatcherStatus_Created: hr = E_ILLEGAL_METHOD_CALL; break;
- case DeviceWatcherStatus_Stopped: hr = E_ILLEGAL_METHOD_CALL; break;
- case DeviceWatcherStatus_Stopping: hr = E_ILLEGAL_METHOD_CALL; break;
- default: hr = E_ILLEGAL_METHOD_CALL;
I think it's cleaner to keep the explicit list of handled states rather than hiding them in the default case. The default case itself should maybe even do `assert( 0 )` instead, but it's probably not useful to change it at this point.