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