From 18a16207c8b4d67de151b60d48fe9faa42d00bd8 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sat, 18 Nov 2023 16:07:24 +0100 Subject: [PATCH] Minor simplification --- src/NetVips/Introspect.cs | 2 +- src/NetVips/NetVips.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NetVips/Introspect.cs b/src/NetVips/Introspect.cs index a45ccd1a..e329af14 100644 --- a/src/NetVips/Introspect.cs +++ b/src/NetVips/Introspect.cs @@ -176,7 +176,7 @@ void AddArg(string name, Enums.ArgumentFlags flags) for (var i = 0; i < nArgs; i++) { - var flag = (Enums.ArgumentFlags)Marshal.PtrToStructure(flags + i * sizeof(int), typeof(int)); + var flag = (Enums.ArgumentFlags)Marshal.PtrToStructure(flags + i * sizeof(int)); if ((flag & Enums.ArgumentFlags.CONSTRUCT) == 0) { continue; diff --git a/src/NetVips/NetVips.cs b/src/NetVips/NetVips.cs index 383a13b6..c99f1100 100644 --- a/src/NetVips/NetVips.cs +++ b/src/NetVips/NetVips.cs @@ -514,7 +514,7 @@ public static Dictionary ValuesForEnum(IntPtr type) var enumValue = Marshal.PtrToStructure(ptr); values[enumValue.ValueNick] = enumValue.Value; - ptr += Marshal.SizeOf(typeof(GEnumValue)); + ptr += Marshal.SizeOf(); } return values;