Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ IndexOfUnchecked()

unsafe int System.Reflection.Internal.MemoryBlock.IndexOfUnchecked ( byte b,
int start )
inlinepackage

Definition at line 421 of file MemoryBlock.cs.

422 {
423 byte* ptr = Pointer + start;
424 for (byte* ptr2 = Pointer + Length; ptr < ptr2; ptr++)
425 {
426 if (*ptr == b)
427 {
428 return (int)(ptr - Pointer);
429 }
430 }
431 return -1;
432 }

References System.Reflection.Internal.MemoryBlock.Length, System.Reflection.Internal.MemoryBlock.Pointer, and System.start.

Referenced by System.Reflection.Internal.MemoryBlock.IndexOf(), and System.Reflection.Metadata.BlobReader.IndexOf().