File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -650,9 +650,15 @@ + (NSArray *)mlc_classNamesToStringWithClassNames:(NSArray *)classNames superCla
650650
651651 }
652652 NSMutableArray *mutArr = [[NSMutableArray alloc ] initWithArray: mutClassSet.allObjects];
653- [mutArr sortUsingComparator: ^NSComparisonResult (NSString * className1, NSString * className2) {
654- return [NSClassFromString (className1) isSubclassOfClass: NSClassFromString (className2)];
655- }];
653+ for (NSInteger i = 0 ; i < mutArr.count ; i++) {
654+ for (NSInteger j = i + 1 ; j < mutArr.count ; j++) {
655+ Class class1 = NSClassFromString (mutArr[i]);
656+ Class class2 = NSClassFromString (mutArr[j]);
657+ if ([class1 isSubclassOfClass: class2]) {
658+ [mutArr exchangeObjectAtIndex: i withObjectAtIndex: j];
659+ }
660+ }
661+ }
656662 return mutArr;
657663}
658664#pragma mark - File Content Helper
You can’t perform that action at this time.
0 commit comments