Add missing nullability annotation, remove suppression
このコミットが含まれているのは:
1 親
9bba3e58f6
コミット
11efdfdb1f
3ファイル変更
+5
-4
検索条件に一致するファイルはありません
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
@@ -240,7 +241,7 @@ internal static partial class HlslKnownTypes
|
||||
/// <param name="originalName">The input type name to map.</param>
|
||||
/// <param name="mappedName">The resulting mapped type name, if found.</param>
|
||||
/// <returns>Whether a mapped name was available.</returns>
|
||||
public static bool TryGetMappedName(string originalName, out string? mappedName)
|
||||
public static bool TryGetMappedName(string originalName, [NotNullWhen(true)] out string? mappedName)
|
||||
{
|
||||
return KnownHlslTypeMetadataNames.TryGetValue(originalName, out mappedName);
|
||||
}
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ internal static class HlslDefinitionsSyntaxProcessor
|
||||
|
||||
structDeclaration = structDeclaration.AddMembers(
|
||||
FieldDeclaration(VariableDeclaration(
|
||||
IdentifierName(mappedType!)).AddVariables(
|
||||
IdentifierName(mappedType)).AddVariables(
|
||||
VariableDeclarator(Identifier(mappedName!)))));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ partial class HlslSourceRewriter
|
||||
|
||||
if (HlslKnownTypes.TryGetMappedName(typeName, out string? mappedName))
|
||||
{
|
||||
return ParseTypeName(mappedName!);
|
||||
return ParseTypeName(mappedName);
|
||||
}
|
||||
|
||||
return ParseTypeName(typeName.ToHlslIdentifierName());
|
||||
@@ -94,7 +94,7 @@ partial class HlslSourceRewriter
|
||||
|
||||
if (HlslKnownTypes.TryGetMappedName(typeName, out string? mappedName))
|
||||
{
|
||||
TypeSyntax newType = ParseTypeName(mappedName!);
|
||||
TypeSyntax newType = ParseTypeName(mappedName);
|
||||
|
||||
return node.ReplaceNode(targetType, newType);
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする