File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -676,11 +676,11 @@ private static EnumFieldInfo[] TopologicalSortEnumFields(EnumFieldInfo[] enumFie
676676 return enumFields ;
677677 }
678678
679- var indices = new Tuple < int , int > [ enumFields . Length ] ;
679+ var indices = new ( int negativePopCount , int index ) [ enumFields . Length ] ;
680680 for ( int i = 0 ; i < enumFields . Length ; i ++ )
681681 {
682682 // we want values with more bits set to come first so negate the pop count
683- indices [ i ] = Tuple . Create ( - PopCount ( enumFields [ i ] . Key ) , i ) ;
683+ indices [ i ] = ( - PopCount ( enumFields [ i ] . Key ) , i ) ;
684684 }
685685
686686 Array . Sort ( indices ) ;
@@ -689,7 +689,7 @@ private static EnumFieldInfo[] TopologicalSortEnumFields(EnumFieldInfo[] enumFie
689689 for ( int i = 0 ; i < indices . Length ; i ++ )
690690 {
691691 // extract the index from the sorted tuple
692- int index = indices [ i ] . Item2 ;
692+ int index = indices [ i ] . index ;
693693 sortedFields [ i ] = enumFields [ index ] ;
694694 }
695695
You can’t perform that action at this time.
0 commit comments