From ed1d80aa152ff7a6beb4ecdf059622918a05f844 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Sat, 20 Jun 2020 20:34:51 +0200 Subject: [PATCH] CS: "unsafe" goes after "static" to avoid IntelliSense notice --- Il2CppInspector.Common/Reflection/MethodBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/Reflection/MethodBase.cs b/Il2CppInspector.Common/Reflection/MethodBase.cs index 3896a27..f5e4eb0 100644 --- a/Il2CppInspector.Common/Reflection/MethodBase.cs +++ b/Il2CppInspector.Common/Reflection/MethodBase.cs @@ -249,8 +249,6 @@ namespace Il2CppInspector.Reflection var modifiers = new StringBuilder(GetAccessModifierString()); - if (RequiresUnsafeContext) - modifiers.Append("unsafe "); if (IsAbstract) modifiers.Append("abstract "); // Methods that implement interfaces are IsVirtual && IsFinal with MethodAttributes.NewSlot (don't show 'virtual sealed' for these) @@ -261,6 +259,8 @@ namespace Il2CppInspector.Reflection modifiers.Append((Attributes & MethodAttributes.VtableLayoutMask) == MethodAttributes.NewSlot ? "virtual " : "override "); if (IsStatic) modifiers.Append("static "); + if (RequiresUnsafeContext) + modifiers.Append("unsafe "); if ((Attributes & MethodAttributes.PinvokeImpl) != 0) modifiers.Append("extern ");