Skip to content

Commit

Permalink
Fix 'IDE0001' warnings (simplify names)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Dec 22, 2024
1 parent e4a8770 commit 728ee86
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/ComputeSharp.D2D1.UI/CanvasEffect.Interop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Rect GetBounds(ICanvasResourceCreator resourceCreator, Matrix3x2 transfor
/// <inheritdoc/>
unsafe int ICanvasImageInterop.GetDevice(ICanvasDevice** device, WIN2D_GET_DEVICE_ASSOCIATION_TYPE* type)
{
using ComPtr<global::ABI.Microsoft.Graphics.Canvas.ICanvasImageInterop> canvasImageInterop = default;
using ComPtr<ABI.Microsoft.Graphics.Canvas.ICanvasImageInterop> canvasImageInterop = default;

RcwMarshaller.GetNativeInterface(GetCanvasImage(), canvasImageInterop.GetAddressOf()).Assert();

Expand All @@ -54,7 +54,7 @@ unsafe int ICanvasImageInterop.GetD2DImage(
float* realizeDpi,
ID2D1Image** ppImage)
{
using ComPtr<global::ABI.Microsoft.Graphics.Canvas.ICanvasImageInterop> canvasImageInterop = default;
using ComPtr<ABI.Microsoft.Graphics.Canvas.ICanvasImageInterop> canvasImageInterop = default;

RcwMarshaller.GetNativeInterface(GetCanvasImage(), canvasImageInterop.GetAddressOf()).Assert();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private void RefreshInputs(WIN2D_GET_D2D_IMAGE_FLAGS flags, float targetDpi, ID2
}
else
{
using ComPtr<global::ABI.Microsoft.Graphics.Canvas.ICanvasImageInterop> canvasImageInterop = default;
using ComPtr<ABI.Microsoft.Graphics.Canvas.ICanvasImageInterop> canvasImageInterop = default;

// Convert to ICanvasImageInterop (this must always succeed, and throws if it doesn't)
RcwMarshaller.GetNativeInterface(source, canvasImageInterop.GetAddressOf()).Assert();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public ReadOnly(ReadWriteTexture1D<T, TPixel> owner)
}

/// <inheritdoc/>
public ref readonly TPixel this[int x] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture1D<T, TPixel>.ReadOnly)}[{typeof(int)}]");
public ref readonly TPixel this[int x] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(int)}]");

/// <inheritdoc/>
public ref readonly TPixel Sample(float u) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture1D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(float)})");
public ref readonly TPixel Sample(float u) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(float)})");

/// <inheritdoc/>
public int Width => this.owner.Width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public ReadOnly(ReadWriteTexture1D<T> owner)
}

/// <inheritdoc/>
public ref readonly T this[int x] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture1D<T>.ReadOnly)}[{typeof(int)}]");
public ref readonly T this[int x] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(int)}]");

/// <inheritdoc/>
public ref readonly T Sample(float u) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture1D<T>.ReadOnly)}.{nameof(Sample)}({typeof(float)})");
public ref readonly T Sample(float u) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(float)})");

/// <inheritdoc/>
public int Width => this.owner.Width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ public ReadOnly(ReadWriteTexture2D<T, TPixel> owner)
}

/// <inheritdoc/>
public ref readonly TPixel this[int x, int y] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}[{typeof(int)}, {typeof(int)}]");
public ref readonly TPixel this[int x, int y] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(int)}, {typeof(int)}]");

/// <inheritdoc/>
public ref readonly TPixel this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}[{typeof(Int2)}]");
public ref readonly TPixel this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(Int2)}]");

/// <inheritdoc/>
public ref readonly TPixel Sample(float u, float v) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)})");
public ref readonly TPixel Sample(float u, float v) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)})");

/// <inheritdoc/>
public ref readonly TPixel Sample(Float2 uv) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(Float2)})");
public ref readonly TPixel Sample(Float2 uv) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(Float2)})");

/// <inheritdoc/>
public int Width => this.owner.Width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ public ReadOnly(ReadWriteTexture2D<T> owner)
}

/// <inheritdoc/>
public ref readonly T this[int x, int y] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}[{typeof(int)}, {typeof(int)}]");
public ref readonly T this[int x, int y] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(int)}, {typeof(int)}]");

/// <inheritdoc/>
public ref readonly T this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}[{typeof(Int2)}]");
public ref readonly T this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(Int2)}]");

/// <inheritdoc/>
public ref readonly T Sample(float u, float v) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)})");
public ref readonly T Sample(float u, float v) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)})");

/// <inheritdoc/>
public ref readonly T Sample(Float2 uv) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}.{nameof(Sample)}({typeof(Float2)})");
public ref readonly T Sample(Float2 uv) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(Float2)})");

/// <inheritdoc/>
public int Width => this.owner.Width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ public ReadOnly(ReadWriteTexture3D<T, TPixel> owner)
}

/// <inheritdoc/>
public ref readonly TPixel this[int x, int y, int z] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}[{typeof(int)}, {typeof(int)}, {typeof(int)}]");
public ref readonly TPixel this[int x, int y, int z] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(int)}, {typeof(int)}, {typeof(int)}]");

/// <inheritdoc/>
public ref readonly TPixel this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}[{typeof(Int3)}]");
public ref readonly TPixel this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(Int3)}]");

/// <inheritdoc/>
public ref readonly TPixel Sample(float u, float v, float w) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)}, {typeof(float)})");
public ref readonly TPixel Sample(float u, float v, float w) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)}, {typeof(float)})");

/// <inheritdoc/>
public ref readonly TPixel Sample(Float3 uvw) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(Float3)})");
public ref readonly TPixel Sample(Float3 uvw) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(Float3)})");

/// <inheritdoc/>
public int Width => this.owner.Width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ public ReadOnly(ReadWriteTexture3D<T> owner)
}

/// <inheritdoc/>
public ref readonly T this[int x, int y, int z] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}[{typeof(int)}, {typeof(int)}, {typeof(int)}]");
public ref readonly T this[int x, int y, int z] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(int)}, {typeof(int)}, {typeof(int)}]");

/// <inheritdoc/>
public ref readonly T this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}[{typeof(Int3)}]");
public ref readonly T this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}[{typeof(Int3)}]");

/// <inheritdoc/>
public ref readonly T Sample(float u, float v, float w) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)}, {typeof(float)})");
public ref readonly T Sample(float u, float v, float w) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)}, {typeof(float)})");

/// <inheritdoc/>
public ref readonly T Sample(Float3 uvw) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}.{nameof(Sample)}({typeof(Float3)})");
public ref readonly T Sample(Float3 uvw) => throw new InvalidExecutionContextException($"{typeof(ReadOnly)}.{nameof(Sample)}({typeof(Float3)})");

/// <inheritdoc/>
public int Width => this.owner.Width;
Expand Down
2 changes: 1 addition & 1 deletion tests/ComputeSharp.Tests/ShaderMembersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void BoolInstanceFields(Device device)
public readonly bool g;
public readonly bool2 h;
public readonly int i;
public readonly ComputeSharp.Bool j; // See https://github.com/Sergio0694/ComputeSharp/issues/727
public readonly Bool j; // See https://github.com/Sergio0694/ComputeSharp/issues/727

public void Execute()
{
Expand Down

0 comments on commit 728ee86

Please sign in to comment.