1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-22 19:58:48 +00:00

Discard return value from native calls

This commit is contained in:
Oliver Booth 2022-11-29 18:38:24 +00:00
parent bb1fda7f9f
commit a91ac7d7fa
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
using VpSharp.Internal; using VpSharp.Internal;
using VpSharp.Internal.NativeAttributes; using VpSharp.Internal.NativeAttributes;
using static VpSharp.Internal.Native; using static VpSharp.Internal.Native;
@ -54,10 +54,10 @@ public class VirtualParadiseModelObject : VirtualParadiseObject
lock (Client.Lock) lock (Client.Lock)
{ {
IntPtr handle = Client.NativeInstanceHandle; IntPtr handle = Client.NativeInstanceHandle;
vp_int_set(handle, IntegerAttribute.ObjectId, Id); _ = vp_int_set(handle, IntegerAttribute.ObjectId, Id);
builder.ApplyChanges(); builder.ApplyChanges();
vp_object_change(handle); _ = vp_object_change(handle);
} }
} }

View File

@ -86,7 +86,7 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
{ {
lock (Client.Lock) lock (Client.Lock)
{ {
vp_object_bump_begin(Client.NativeInstanceHandle, Id, session); _ = vp_object_bump_begin(Client.NativeInstanceHandle, Id, session);
} }
return ValueTask.CompletedTask; return ValueTask.CompletedTask;
@ -96,7 +96,7 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
{ {
lock (Client.Lock) lock (Client.Lock)
{ {
vp_object_bump_end(Client.NativeInstanceHandle, Id, session); _ = vp_object_bump_end(Client.NativeInstanceHandle, Id, session);
} }
return ValueTask.CompletedTask; return ValueTask.CompletedTask;
@ -139,7 +139,7 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
int session = target?.Session ?? 0; int session = target?.Session ?? 0;
(float x, float y, float z) = (Vector3) (position ?? Vector3d.Zero); (float x, float y, float z) = (Vector3) (position ?? Vector3d.Zero);
vp_object_click(Client.NativeInstanceHandle, Id, session, x, y, z); _ = vp_object_click(Client.NativeInstanceHandle, Id, session, x, y, z);
} }
return Task.CompletedTask; return Task.CompletedTask;