Skip to content

Commit

Permalink
Fix missing usings
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Mar 19, 2024
1 parent d9f3824 commit eacde76
Show file tree
Hide file tree
Showing 29 changed files with 5 additions and 30 deletions.
4 changes: 2 additions & 2 deletions src/SharpMetal.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ public static void GenerateUsings(HeaderInfo headerInfo, CodeGenContext context,
}
}

if (headerInfo.StructInstances.Any() || headerInfo.EnumInstances.Any())
if (headerInfo.StructInstances.Any())
{
context.WriteLine("using System.Runtime.InteropServices;");
hasAnyUsings = true;
}

if (headerInfo.StructInstances.Any() || headerInfo.ClassInstances.Any())
if (headerInfo.StructInstances.Any() || headerInfo.ClassInstances.Any() || headerInfo.EnumInstances.Any())
{
context.WriteLine("using System.Runtime.Versioning;");
hasAnyUsings = true;
Expand Down
2 changes: 1 addition & 1 deletion src/SharpMetal/Foundation/NSObjCRuntime.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;

namespace SharpMetal.Foundation
{
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Foundation/NSProcessInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;

Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Foundation/NSString.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLArgument.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLBinaryArchive.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLBlitCommandEncoder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLCaptureManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLCommandBuffer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLCommandEncoder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLDepthStencil.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLDynamicLibrary.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLFunctionDescriptor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLFunctionLog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLHeap.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLIOCommandBuffer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLIOCommandQueue.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
2 changes: 1 addition & 1 deletion src/SharpMetal/Metal/MTLIOCompressor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.Foundation;

namespace SharpMetal.Metal
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLIntersectionFunctionTable.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLLibrary.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLPipeline.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
2 changes: 1 addition & 1 deletion src/SharpMetal/Metal/MTLPixelFormat.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.Foundation;

namespace SharpMetal.Metal
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLRenderPipeline.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLResource.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLSampler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLStageInputOutputDescriptor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/Metal/MTLVertexDescriptor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Foundation;
Expand Down
1 change: 0 additions & 1 deletion src/SharpMetal/MetalFX/MTLFXSpatialScaler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using SharpMetal.ObjectiveCCore;
using SharpMetal.Metal;
Expand Down

0 comments on commit eacde76

Please sign in to comment.