Make AtkValuePtr.TryGet out non-nullable struct

This commit is contained in:
Haselnussbomber 2026-02-16 22:27:57 +01:00
parent 5da79a7dba
commit d776498360
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1

View file

@ -87,7 +87,7 @@ public readonly unsafe struct AtkValuePtr(nint address) : IEquatable<AtkValuePtr
/// <returns>
/// <c>true</c> if the value was successfully extracted and matched <typeparamref name="T"/>; otherwise, <c>false</c>.
/// </returns>
public unsafe bool TryGet<T>([NotNullWhen(true)] out T? result) where T : struct
public unsafe bool TryGet<T>(out T result) where T : struct
{
var value = this.GetValue();
if (value is T typed)