Removed 'unreachable' else initialization and replaced with error indicating a wtf

This commit is contained in:
hexbabe
2023-10-31 14:13:06 -04:00
committed by Clyde Bazile
parent 7ae82fbda7
commit 09b497727d

View File

@@ -46,6 +46,8 @@
} \ } \
} while(0) } while(0)
static NSString *const UnrecognizedMacOSVersionException = @"UnrecognizedMacOSVersionException";
@interface VideoDataDelegate : NSObject<AVCaptureVideoDataOutputSampleBufferDelegate> @interface VideoDataDelegate : NSObject<AVCaptureVideoDataOutputSampleBufferDelegate>
@property (readonly) AVBindDataCallback mCallback; @property (readonly) AVBindDataCallback mCallback;
@@ -191,13 +193,10 @@ STATUS AVBindDevices(AVBindMediaType mediaType, PAVBindDevice *ppDevices, int *p
AVCaptureDeviceTypeMicrophone, AVCaptureDeviceTypeMicrophone,
AVCaptureDeviceTypeExternal, AVCaptureDeviceTypeExternal,
]; ];
} } else {
else { @throw [NSException exceptionWithName:UnrecognizedMacOSVersionException
refAllTypes = @[ reason:@"Unrecognized or unsupported macOS version detected."
AVCaptureDeviceTypeBuiltInWideAngleCamera, userInfo:nil];
AVCaptureDeviceTypeBuiltInMicrophone,
AVCaptureDeviceTypeExternalUnknown,
];
} }
#else #else
refAllTypes = @[ refAllTypes = @[