Enable 'IDE0060' warnings, fix issues
このコミットが含まれているのは:
1 親
043f8ddcaf
コミット
0a187f64bc
14ファイル変更
+18
-28
検索条件に一致するファイルはありません
@@ -1,6 +1,6 @@
|
||||
using ComputeSharp.Core.Intrinsics;
|
||||
|
||||
#pragma warning disable IDE0022
|
||||
#pragma warning disable IDE0022, IDE0060
|
||||
|
||||
namespace ComputeSharp;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
namespace ComputeSharp;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -59,6 +59,8 @@ partial class CanvasEffectPropertyGenerator
|
||||
return false;
|
||||
}
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
// The property must be in a type with a base type (as it must derive from CanvasEffect)
|
||||
return node.Parent?.IsTypeDeclarationWithOrPotentiallyWithBaseTypes<ClassDeclarationSyntax>() == true;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ unsafe partial class PixelShaderEffect<T>
|
||||
Span<ComPtr<ABI.Microsoft.Graphics.Canvas.Effects.ICanvasEffect>> canvasEffects = sourceEffects.Length <= 16
|
||||
? stackalloc ComPtr<ABI.Microsoft.Graphics.Canvas.Effects.ICanvasEffect>[16]
|
||||
: MemoryMarshal.Cast<IntPtr, ComPtr<ABI.Microsoft.Graphics.Canvas.Effects.ICanvasEffect>>(
|
||||
canvasEffectsAbiArray = ArrayPool<IntPtr>.Shared.Rent(sourceEffects.Length));
|
||||
(canvasEffectsAbiArray = ArrayPool<IntPtr>.Shared.Rent(sourceEffects.Length)).AsSpan());
|
||||
|
||||
// Clear the span to ensure no false positives are accidentally disposed
|
||||
canvasEffects.Clear();
|
||||
|
||||
+2
@@ -6,6 +6,8 @@ using ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers;
|
||||
using ComputeSharp.D2D1.Shaders.Interop.Extensions;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
namespace ComputeSharp.D2D1.Interop.Effects;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -229,12 +229,6 @@ internal struct ImmutableArrayBuilder<T> : IDisposable
|
||||
this.index += items.Length;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ImmutableArrayBuilder{T}.Clear"/>
|
||||
public void Clear(ReadOnlySpan<T> items)
|
||||
{
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ImmutableArrayBuilder{T}.Insert"/>
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
@@ -254,9 +248,7 @@ internal struct ImmutableArrayBuilder<T> : IDisposable
|
||||
this.index++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears the items in the current writer.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="ImmutableArrayBuilder{T}.Clear"/>
|
||||
public void Clear()
|
||||
{
|
||||
if (typeof(T) != typeof(byte) &&
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
#pragma warning disable IDE0290
|
||||
#pragma warning disable IDE0060, IDE0290
|
||||
|
||||
namespace ComputeSharp.SourceGeneration.Helpers;
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@ partial class ComputeShaderDescriptorGenerator
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
ImmutableArray<HlslSharedBuffer> sharedBuffers = GetSharedBuffers(
|
||||
diagnostics,
|
||||
structDeclarationSymbol,
|
||||
discoveredTypes);
|
||||
|
||||
@@ -323,12 +322,10 @@ partial class ComputeShaderDescriptorGenerator
|
||||
/// <summary>
|
||||
/// Gets a sequence of captured members and their mapped names.
|
||||
/// </summary>
|
||||
/// <param name="diagnostics">The collection of produced <see cref="DiagnosticInfo"/> instances.</param>
|
||||
/// <param name="structDeclarationSymbol">The input <see cref="INamedTypeSymbol"/> instance to process.</param>
|
||||
/// <param name="types">The collection of currently discovered types.</param>
|
||||
/// <returns>A sequence of captured members in <paramref name="structDeclarationSymbol"/>.</returns>
|
||||
private static ImmutableArray<HlslSharedBuffer> GetSharedBuffers(
|
||||
ImmutableArrayBuilder<DiagnosticInfo> diagnostics,
|
||||
INamedTypeSymbol structDeclarationSymbol,
|
||||
ICollection<INamedTypeSymbol> types)
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする