Skip to content

Commit adc3c95

Browse files
committed
Enable Nullable Reference Type annotations
1 parent d0edefe commit adc3c95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+117
-110
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<DebugType>embedded</DebugType>
2626
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
2727
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
28-
<Nullable>disable</Nullable>
28+
<Nullable>enable</Nullable>
2929
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
3030
<SignAssembly>true</SignAssembly>
3131
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>

sources/LLVMSharp.Interop/Extensions/LLVM.ResolveLibrary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace LLVMSharp.Interop;
99

1010
public static unsafe partial class LLVM
1111
{
12-
public static event DllImportResolver ResolveLibrary;
12+
public static event DllImportResolver? ResolveLibrary;
1313

1414
static LLVM()
1515
{

sources/LLVMSharp.Interop/Extensions/LLVMAttributeRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public LLVMAttributeRef(IntPtr handle)
2121

2222
public static bool operator !=(LLVMAttributeRef left, LLVMAttributeRef right) => !(left == right);
2323

24-
public override bool Equals(object obj) => (obj is LLVMAttributeRef other) && Equals(other);
24+
public override bool Equals(object? obj) => (obj is LLVMAttributeRef other) && Equals(other);
2525

2626
public bool Equals(LLVMAttributeRef other) => this == other;
2727

sources/LLVMSharp.Interop/Extensions/LLVMBasicBlockRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static LLVMBasicBlockRef InsertInContext(LLVMContextRef C, LLVMBasicBlock
6767

6868
public void Dump() => LLVM.DumpValue(this);
6969

70-
public override bool Equals(object obj) => (obj is LLVMBasicBlockRef other) && Equals(other);
70+
public override bool Equals(object? obj) => (obj is LLVMBasicBlockRef other) && Equals(other);
7171

7272
public bool Equals(LLVMBasicBlockRef other) => this == other;
7373

sources/LLVMSharp.Interop/Extensions/LLVMBinaryRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public LLVMBinaryRef(IntPtr handle)
2121

2222
public static bool operator !=(LLVMBinaryRef left, LLVMBinaryRef right) => !(left == right);
2323

24-
public override bool Equals(object obj) => (obj is LLVMBinaryRef other) && Equals(other);
24+
public override bool Equals(object? obj) => (obj is LLVMBinaryRef other) && Equals(other);
2525

2626
public bool Equals(LLVMBinaryRef other) => this == other;
2727

sources/LLVMSharp.Interop/Extensions/LLVMBuilderRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ public void Dispose()
808808
}
809809
}
810810

811-
public override bool Equals(object obj) => (obj is LLVMBuilderRef other) && Equals(other);
811+
public override bool Equals(object? obj) => (obj is LLVMBuilderRef other) && Equals(other);
812812

813813
public bool Equals(LLVMBuilderRef other) => this == other;
814814

sources/LLVMSharp.Interop/Extensions/LLVMComdatRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public LLVMComdatRef(IntPtr handle)
2121

2222
public static bool operator !=(LLVMComdatRef left, LLVMComdatRef right) => !(left == right);
2323

24-
public override bool Equals(object obj) => (obj is LLVMComdatRef other) && Equals(other);
24+
public override bool Equals(object? obj) => (obj is LLVMComdatRef other) && Equals(other);
2525

2626
public bool Equals(LLVMComdatRef other) => this == other;
2727

sources/LLVMSharp.Interop/Extensions/LLVMContextRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void Dispose()
9595
}
9696
}
9797

98-
public override bool Equals(object obj) => (obj is LLVMContextRef other) && Equals(other);
98+
public override bool Equals(object? obj) => (obj is LLVMContextRef other) && Equals(other);
9999

100100
public bool Equals(LLVMContextRef other) => this == other;
101101

sources/LLVMSharp.Interop/Extensions/LLVMDIBuilderRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public LLVMMetadataRef CreateTypedef(LLVMMetadataRef Type, ReadOnlySpan<char> Na
113113

114114
public void DIBuilderFinalize() => LLVM.DIBuilderFinalize(this);
115115

116-
public override bool Equals(object obj) => (obj is LLVMDIBuilderRef other) && Equals(other);
116+
public override bool Equals(object? obj) => (obj is LLVMDIBuilderRef other) && Equals(other);
117117

118118
public bool Equals(LLVMDIBuilderRef other) => this == other;
119119

sources/LLVMSharp.Interop/Extensions/LLVMDiagnosticInfoRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public LLVMDiagnosticInfoRef(IntPtr handle)
2121

2222
public static bool operator !=(LLVMDiagnosticInfoRef left, LLVMDiagnosticInfoRef right) => !(left == right);
2323

24-
public override bool Equals(object obj) => (obj is LLVMDiagnosticInfoRef other) && Equals(other);
24+
public override bool Equals(object? obj) => (obj is LLVMDiagnosticInfoRef other) && Equals(other);
2525

2626
public bool Equals(LLVMDiagnosticInfoRef other) => this == other;
2727

0 commit comments

Comments
 (0)