Make Optional<T> into readonly struct to avoid heap allocations

This commit is contained in:
Daniel Cronqvist 2024-12-02 22:45:14 +01:00
parent 21470cb056
commit 9aa2c63e0b
35 changed files with 176 additions and 203 deletions

View file

@ -58,7 +58,7 @@ public partial class TestData
new IntProperty { Name = "intprop", Value = 8 },
new ObjectProperty { Name = "objectprop", Value = 5 },
new StringProperty { Name = "stringprop", Value = "This is a string, hello world!" },
new ColorProperty { Name = "unsetcolorprop", Value = Optional<TiledColor>.Empty }
new ColorProperty { Name = "unsetcolorprop", Value = Optional.Empty }
]
};
}