From e062bed3560495a3769aa993de1da713f2ea4cf7 Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Tue, 9 Jan 2024 10:05:31 -0500 Subject: [PATCH] Use inlined method in indexer now that Lua compiler is fixed --- .../OilField/Containers/LocationIntDictionary.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/FactorioTools/OilField/Containers/LocationIntDictionary.cs b/src/FactorioTools/OilField/Containers/LocationIntDictionary.cs index 1838827d..47296bb0 100644 --- a/src/FactorioTools/OilField/Containers/LocationIntDictionary.cs +++ b/src/FactorioTools/OilField/Containers/LocationIntDictionary.cs @@ -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;