Skip to content

Commit

Permalink
Add aggressive inlining
Browse files Browse the repository at this point in the history
  • Loading branch information
mpewsey committed Jun 26, 2022
1 parent 5ea59ec commit b1deca0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ManiaMap/Array2D.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Text;

Expand Down Expand Up @@ -149,6 +150,7 @@ public void Fill(T value)
/// </summary>
/// <param name="row">The row index.</param>
/// <param name="column">The column index.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool IndexExists(int row, int column)
{
return (uint)row < Rows && (uint)column < Columns;
Expand All @@ -159,6 +161,7 @@ public bool IndexExists(int row, int column)
/// </summary>
/// <param name="row">The row index.</param>
/// <param name="column">The column index.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private int Index(int row, int column)
{
return row * Columns + column;
Expand Down

0 comments on commit b1deca0

Please sign in to comment.