Updated formatting of MPPRunningMode.h

This commit is contained in:
Prianka Liz Kariat 2023-03-03 14:40:00 +05:30
parent 7b8d92ba47
commit 87df23f0fa

View File

@ -39,20 +39,19 @@ typedef NS_ENUM(NSUInteger, MPPRunningMode) {
} NS_SWIFT_NAME(RunningMode); } NS_SWIFT_NAME(RunningMode);
NS_INLINE NSString *MPPRunningModeDisplayName(MPPRunningMode runningMode) { NS_INLINE NSString *MPPRunningModeDisplayName(MPPRunningMode runningMode) {
if (runningMode > MPPRunningModeLiveStream) { if (runningMode > MPPRunningModeLiveStream) {
return nil; return nil;
} }
#define MPPRunningModeDisplayNameMap(mode) [mode] = @#mode #define MPPRunningModeDisplayNameMap(mode) [mode] = @ #mode
NSString *displayNameMap[MPPRunningModeLiveStream + 1] = { NSString *displayNameMap[MPPRunningModeLiveStream + 1] = {
MPPRunningModeDisplayNameMap(MPPRunningModeImage), MPPRunningModeDisplayNameMap(MPPRunningModeImage),
MPPRunningModeDisplayNameMap(MPPRunningModeVideo), MPPRunningModeDisplayNameMap(MPPRunningModeVideo),
MPPRunningModeDisplayNameMap(MPPRunningModeLiveStream), MPPRunningModeDisplayNameMap(MPPRunningModeLiveStream),
}; };
#undef MPPRunningModeDisplayNameMap #undef MPPRunningModeDisplayNameMap
return displayNameMap[runningMode]; return displayNameMap[runningMode];
} }