Files
CalamityModPublic/Utilities/ILEditingUtils.cs
T
tomat 67bceff6e7 Initial dotnet format pass.
This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
2024-02-28 21:49:50 -08:00

18 lines
490 B
C#

using MonoMod.Cil;
namespace CalamityMod
{
public static partial class CalamityUtils
{
/// <summary>
/// Moves an <see cref="ILCursor"/> to the final Ret call in the method the cursor is assocated with.
/// </summary>
/// <param name="cursor">The cursor.</param>
public static ILCursor GotoFinalRet(this ILCursor cursor)
{
while (cursor.TryGotoNext(c => c.MatchRet())) { }
return cursor;
}
}
}