Error: C:\Program Files\Epic Games\UE_4.25\Engine\Source\Runtime\Core\Public\Containers/SparseArray.h(778): error C2440: '-': cannot convert from 'const TSparseArrayElementOrFreeListLink<TAlignedBytes<4,4>> *' to 'const int *'
> C:\Program Files\Epic Games\UE_4.25\Engine\Source\Runtime\Core\Public\Containers/SparseArray.h(776): note: while compiling class template member function 'int32 TSparseArray<int,FDefaultSparseArrayAllocator>::PointerToIndex(const int *) const'
Note from user:
we are using a workaround "int index = ptrToElement - &sparseArray[0];" but it is only valid code because in TSparseArray::operator[] a essential check has been commented out with the note "Disabled to improve loading times -BZ". The workaround would become a bug if that check would be enabled again.
The engine code line "int32 Index = Ptr - &GetData(0);" should be "int32 Index = Ptr - (ElementType*)&GetData(Index).ElementData;"
Result: Compiler Error
Expected: No compiler error
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-93545 in the post.