Skip to content

Commit

Permalink
macosx: Fix switch case and return warnings in VLCLibrarySegment
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and fkuehne committed Sep 13, 2024
1 parent c38e732 commit 4e64551
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions modules/gui/macosx/library/VLCLibrarySegment.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ - (NSString *)displayStringForType:(VLCLibrarySegmentType)segmentType
NSAssert(NO, @"displayStringForType should not be called for this segment type");
case VLCLibraryLowSentinelSegment:
case VLCLibraryHighSentinelSegment:
NSAssert(true, @"Invalid segment value");
NSAssert(NO, @"Invalid segment value");
}
return nil;
}
Expand Down Expand Up @@ -256,7 +256,13 @@ - (NSImage *)oldIconImageForType:(VLCLibrarySegmentType)segmentType
case VLCLibraryGroupsSegment:
case VLCLibraryGroupsGroupSubSegment:
return [NSImage imageNamed:@"NSTouchBarTagIcon"];
case VLCLibraryLowSentinelSegment:
case VLCLibraryHighSentinelSegment:
NSAssert(NO, @"Invalid segment value");
return nil;
}

return nil;
}

- (NSImage *)newIconImageForType:(VLCLibrarySegmentType)segmentType
Expand Down Expand Up @@ -316,10 +322,13 @@ - (NSImage *)newIconImageForType:(VLCLibrarySegmentType)segmentType
case VLCLibraryGroupsGroupSubSegment:
return [NSImage imageWithSystemSymbolName:@"play.rectangle"
accessibilityDescription:@"Group icon"];
case VLCLibraryLowSentinelSegment:
case VLCLibraryHighSentinelSegment:
NSAssert(NO, @"Invalid segment value");
return nil;
}
} else {
return nil;
}
return nil;
}

- (NSImage *)iconForType:(VLCLibrarySegmentType)segmentType
Expand Down

0 comments on commit 4e64551

Please sign in to comment.