mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-31 04:44:14 -04:00 
			
		
		
		
	added files via upload
This commit is contained in:
		
							
								
								
									
										47
									
								
								Tweaks/FLEX/Utility/Categories/FLEXRuntime+Compare.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								Tweaks/FLEX/Utility/Categories/FLEXRuntime+Compare.m
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| // | ||||
| //  FLEXRuntime+Compare.m | ||||
| //  FLEX | ||||
| // | ||||
| //  Created by Tanner Bennett on 8/28/19. | ||||
| //  Copyright © 2020 FLEX Team. All rights reserved. | ||||
| // | ||||
|  | ||||
| #import "FLEXRuntime+Compare.h" | ||||
|  | ||||
| @implementation FLEXProperty (Compare) | ||||
|  | ||||
| - (NSComparisonResult)compare:(FLEXProperty *)other { | ||||
|     NSComparisonResult r = [self.name caseInsensitiveCompare:other.name]; | ||||
|     if (r == NSOrderedSame) { | ||||
|         // TODO make sure empty image name sorts above an image name | ||||
|         return [self.imageName ?: @"" compare:other.imageName]; | ||||
|     } | ||||
|  | ||||
|     return r; | ||||
| } | ||||
|  | ||||
| @end | ||||
|  | ||||
| @implementation FLEXIvar (Compare) | ||||
|  | ||||
| - (NSComparisonResult)compare:(FLEXIvar *)other { | ||||
|     return [self.name caseInsensitiveCompare:other.name]; | ||||
| } | ||||
|  | ||||
| @end | ||||
|  | ||||
| @implementation FLEXMethodBase (Compare) | ||||
|  | ||||
| - (NSComparisonResult)compare:(FLEXMethodBase *)other { | ||||
|     return [self.name caseInsensitiveCompare:other.name]; | ||||
| } | ||||
|  | ||||
| @end | ||||
|  | ||||
| @implementation FLEXProtocol (Compare) | ||||
|  | ||||
| - (NSComparisonResult)compare:(FLEXProtocol *)other { | ||||
|     return [self.name caseInsensitiveCompare:other.name]; | ||||
| } | ||||
|  | ||||
| @end | ||||
		Reference in New Issue
	
	Block a user
	 Balackburn
					Balackburn