MCPcopy Create free account
hub / github.com/cuberite/cuberite / WriteLEInt

Method WriteLEInt

src/ByteBuffer.cpp:646–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644
645
646bool cByteBuffer::WriteLEInt(int a_Value)
647{
648 CHECK_THREAD;
649 CheckValid();
650 #ifdef IS_LITTLE_ENDIAN
651 return WriteBuf((const char *)&a_Value, 4);
652 #else
653 int Value = ((a_Value >> 24) & 0xff) | ((a_Value >> 16) & 0xff00) | ((a_Value >> 8) & 0xff0000) | (a_Value & 0xff000000);
654 return WriteBuf((const char *)&Value, 4);
655 #endif
656}
657
658
659

Callers 1

SendPacketMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected