NativeCollections icon indicating copy to clipboard operation
NativeCollections copied to clipboard

NativeLinkedList.GetEnumerator .MoveNext returns true for empty Lists

Open StefanWokusch opened this issue 3 years ago • 0 comments

I have an empty list and try to do it like the usual Native API

var list = new NativeLinkedList<int>(capacity: 10, Allocator.Temp);
var e = list.getEnumerator();
while(e.MoveNext()) {
// do something
}

Workaround:

while(e.MoveNext() && e.IsValid()){
...
}

StefanWokusch avatar Nov 09 '22 06:11 StefanWokusch