@@ -1830,10 +1830,8 @@ private class Rewriter(JobData job) : CSharpSyntaxRewriter(true)
1830
1830
public override SyntaxNode ? VisitEnumDeclaration ( EnumDeclarationSyntax node )
1831
1831
{
1832
1832
var iden = node . Identifier . ToString ( ) ;
1833
- if ( iden . Contains ( "FlagBits" ) )
1834
- {
1835
- iden = iden . Replace ( "FlagBits" , "Flags" ) ;
1836
- }
1833
+ iden = iden . Replace ( "FlagBits" , "Flags" ) ;
1834
+
1837
1835
if (
1838
1836
job . Groups . ContainsKey ( iden )
1839
1837
&& ! node . Ancestors ( ) . OfType < BaseTypeDeclarationSyntax > ( ) . Any ( )
@@ -1897,10 +1895,7 @@ private class Rewriter(JobData job) : CSharpSyntaxRewriter(true)
1897
1895
var typeName = s . AsSpan ( ) [ "const " . Length ..] . Trim ( ) . ToString ( ) ;
1898
1896
1899
1897
// Vulkan/OpenXR enum name
1900
- if ( typeName . Contains ( "FlagBits" ) )
1901
- {
1902
- typeName = typeName . Replace ( "FlagBits" , "Flags" ) ;
1903
- }
1898
+ typeName = typeName . Replace ( "FlagBits" , "Flags" ) ;
1904
1899
1905
1900
// Remove constants that match an enum group name
1906
1901
// We save these constants so we can move them to the actual enum
@@ -1954,10 +1949,7 @@ internal void ReadGroups(XDocument doc, JobData data, HashSet<string> vendors)
1954
1949
}
1955
1950
1956
1951
// Vulkan/OpenXR enum name
1957
- if ( groupName ? . Contains ( "FlagBits" ) ?? false )
1958
- {
1959
- groupName = groupName . Replace ( "FlagBits" , "Flags" ) ;
1960
- }
1952
+ groupName = groupName ? . Replace ( "FlagBits" , "Flags" ) ;
1961
1953
1962
1954
// Skip Vulkan API Constants since it is not an enum
1963
1955
if ( block . Attribute ( "type" ) ? . Value == "constants" )
0 commit comments