Add explicit discards to all value returning expressions

このコミットが含まれているのは:
Sergio Pedri committed 2022-10-15 09:10:18 -07:00
1 親 38adbe6087
コミット 9343ac7f7b
47ファイル変更
+144 -144

検索条件に一致するファイルはありません

+2 -2
ファイルの表示
@@ -46,7 +46,7 @@ internal static partial class HlslKnownKeywords
// HLSL primitive names
foreach (var type in HlslKnownTypes.KnownVectorTypes.Concat(HlslKnownTypes.KnownMatrixTypes))
{
knownKeywords.Add(type.Name.ToLowerInvariant());
_ = knownKeywords.Add(type.Name.ToLowerInvariant());
}
// HLSL intrinsics method names
@@ -54,7 +54,7 @@ internal static partial class HlslKnownKeywords
{
string name = method.GetCustomAttribute<HlslIntrinsicNameAttribute>()?.Name ?? method.Name;
knownKeywords.Add(name);
_ = knownKeywords.Add(name);
}
// Let other types inject additional keywords
+2 -2
ファイルの表示
@@ -222,7 +222,7 @@ internal static partial class HlslKnownTypes
// Explicitly prevent bool from being a field in a custom struct
if (type.SpecialType == SpecialType.System_Boolean)
{
invalidTypes.Add(type);
_ = invalidTypes.Add(type);
return;
}
@@ -236,7 +236,7 @@ internal static partial class HlslKnownTypes
type.IsRefLikeType ||
type.GetFullyQualifiedName().StartsWith("System."))
{
invalidTypes.Add(type);
_ = invalidTypes.Add(type);
return;
}