Skip to content

Commit 54dd8dd

Browse files
committed
cleanup from merging
1 parent 1582ea0 commit 54dd8dd

File tree

3 files changed

+11
-28
lines changed

3 files changed

+11
-28
lines changed

Silk.NET.sln

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Microsoft Visual Studio Solution File, Format Version 12.00
32
# Visual Studio Version 17
43
VisualStudioVersion = 17.12.35527.113
@@ -10,10 +9,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
109
.gitignore = .gitignore
1110
Directory.Build.props = Directory.Build.props
1211
Directory.Build.targets = Directory.Build.targets
12+
Directory.Packages.props = Directory.Packages.props
1313
generator.json = generator.json
1414
LICENSE.md = LICENSE.md
1515
Silk.NET.sln.DotSettings = Silk.NET.sln.DotSettings
16-
Directory.Packages.props = Directory.Packages.props
1716
EndProjectSection
1817
EndProject
1918
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{9DB0EA3E-7216-4F9C-98F5-8A7483E9F083}"
@@ -151,10 +150,13 @@ Global
151150
{AF6C70ED-D6A8-4C57-8DB3-EAFF94396049}.Release|Any CPU.ActiveCfg = Release|Any CPU
152151
{AF6C70ED-D6A8-4C57-8DB3-EAFF94396049}.Release|Any CPU.Build.0 = Release|Any CPU
153152
{9625C977-25BE-48F3-9B6F-BC94B8B799A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
153+
{9625C977-25BE-48F3-9B6F-BC94B8B799A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
154154
{9625C977-25BE-48F3-9B6F-BC94B8B799A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
155155
{19B05730-F97E-43D4-B922-DF4697E5CE5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
156+
{19B05730-F97E-43D4-B922-DF4697E5CE5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
156157
{19B05730-F97E-43D4-B922-DF4697E5CE5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
157158
{D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
159+
{D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Debug|Any CPU.Build.0 = Debug|Any CPU
158160
{D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Release|Any CPU.ActiveCfg = Release|Any CPU
159161
{3CADD95A-179F-4ECF-A49D-4B753832C63C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
160162
{3CADD95A-179F-4ECF-A49D-4B753832C63C}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -165,6 +167,7 @@ Global
165167
{6FA628B8-9696-4847-89F9-E58F470AF4FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
166168
{6FA628B8-9696-4847-89F9-E58F470AF4FB}.Release|Any CPU.Build.0 = Release|Any CPU
167169
{F16C0AB9-DE7E-4C09-9EE9-DAA8B8E935A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
170+
{F16C0AB9-DE7E-4C09-9EE9-DAA8B8E935A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
168171
{F16C0AB9-DE7E-4C09-9EE9-DAA8B8E935A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
169172
{F16C0AB9-DE7E-4C09-9EE9-DAA8B8E935A6}.Release|Any CPU.Build.0 = Release|Any CPU
170173
{EF07CBB5-D253-4CA9-A5DA-8B3DF2B0DF8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

sources/Core/Core/Pointers/Ptr.cs

+4-22
Original file line numberDiff line numberDiff line change
@@ -225,38 +225,20 @@ public T[] ToArray<T>(int length)
225225
/// <summary>
226226
/// Creates a <see cref="nuint"/> from a <see cref="Ptr"/>
227227
/// </summary>
228-
/// <param name="ptr"></param>
228+
/// <param name="ptr">the pointer</param>
229229
[MethodImpl(
230230
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
231231
)]
232-
public static implicit operator nuint(Ptr ptr) => new(ptr.Native);
232+
public static explicit operator nuint(Ptr ptr) => new(ptr.Native);
233233

234234
/// <summary>
235235
/// Creates a <see cref="Ptr"/> from a <see cref="nuint"/>
236236
/// </summary>
237-
/// <param name="ptr"></param>
238-
[MethodImpl(
239-
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
240-
)]
241-
public static implicit operator Ptr(nuint ptr) => new(ptr.ToPointer());
242-
243-
/// <summary>
244-
/// Creates a <see cref="nint"/> from a <see cref="Ptr"/>
245-
/// </summary>
246-
/// <param name="ptr"></param>
247-
[MethodImpl(
248-
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
249-
)]
250-
public static implicit operator nint(Ptr ptr) => new(ptr.Native);
251-
252-
/// <summary>
253-
/// Creates a <see cref="Ptr"/> from a <see cref="nint"/>
254-
/// </summary>
255-
/// <param name="ptr"></param>
237+
/// <param name="ptr">the integer</param>
256238
[MethodImpl(
257239
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
258240
)]
259-
public static implicit operator Ptr(nint ptr) => new(ptr.ToPointer());
241+
public static explicit operator Ptr(nuint ptr) => new(ptr.ToPointer());
260242

261243
/// <summary>
262244
/// Creates a <see cref="Ref"/> from a <see cref="Ptr"/>

sources/Core/Core/PublicAPI/net8.0/PublicAPI.Unshipped.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,11 @@ static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3
425425
static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D<uint> this, int length, int[]! lengths) -> string?[]?[]?
426426
static Silk.NET.Core.PointerExtensions.ReadToStringArray(this Silk.NET.Core.Ref3D<ushort> this, int length, int[]! lengths) -> string?[]?[]?
427427
static Silk.NET.Core.Ptr.explicit operator nint(Silk.NET.Core.Ptr ptr) -> nint
428+
static Silk.NET.Core.Ptr.explicit operator nuint(Silk.NET.Core.Ptr ptr) -> nuint
428429
static Silk.NET.Core.Ptr.explicit operator Silk.NET.Core.Ptr(nint ptr) -> Silk.NET.Core.Ptr
430+
static Silk.NET.Core.Ptr.explicit operator Silk.NET.Core.Ptr(nuint ptr) -> Silk.NET.Core.Ptr
429431
static Silk.NET.Core.Ptr.explicit operator Silk.NET.Core.Ptr(Silk.NET.Core.Ref ptr) -> Silk.NET.Core.Ptr
430432
static Silk.NET.Core.Ptr.explicit operator string!(Silk.NET.Core.Ptr ptr) -> string!
431-
static Silk.NET.Core.Ptr.implicit operator nint(Silk.NET.Core.Ptr ptr) -> nint
432-
static Silk.NET.Core.Ptr.implicit operator nuint(Silk.NET.Core.Ptr ptr) -> nuint
433-
static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(nint ptr) -> Silk.NET.Core.Ptr
434-
static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(nuint ptr) -> Silk.NET.Core.Ptr
435433
static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(Silk.NET.Core.NullPtr ptr) -> Silk.NET.Core.Ptr
436434
static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ptr(void* ptr) -> Silk.NET.Core.Ptr
437435
static Silk.NET.Core.Ptr.implicit operator Silk.NET.Core.Ref(Silk.NET.Core.Ptr ptr) -> Silk.NET.Core.Ref

0 commit comments

Comments
 (0)