Skip to content

Commit

Permalink
Use inlined method in indexer now that Lua compiler is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
joelverhagen committed Jan 9, 2024
1 parent cab272c commit e062bed
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ public LocationIntDictionary(int width, int capacity)

public T this[Location index]
{
// should use GetIndex, but blocked by https://github.com/yanghuan/CSharp.lua/issues/485
get => _dictionary[index.Y * _width + index.X];
set => _dictionary[index.Y * _width + index.X] = value;
get => _dictionary[GetIndex(index)];
set => _dictionary[GetIndex(index)] = value;
}

public int Count => _dictionary.Count;
Expand Down

0 comments on commit e062bed

Please sign in to comment.