diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-24 16:58:24 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-24 16:58:24 +0300 |
commit | 87be5f79975d0a3a5d6b7665aafc4be68b4f4afc (patch) | |
tree | 7c65ee999bd6c7e72d256940716ffb556ed4c345 | |
parent | 0277bc7af761a113062bc86b3e5c3c5405a61735 (diff) |
SL-4150 Rename htonmemcpy
-rw-r--r-- | indra/llcharacter/llgesture.cpp | 16 | ||||
-rw-r--r-- | indra/llmessage/lldatapacker.cpp | 58 | ||||
-rw-r--r-- | indra/llmessage/llmail.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/llmessagetemplate.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/lltemplatemessagebuilder.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/lltemplatemessagereader.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llxfer.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/message.h | 62 | ||||
-rw-r--r-- | indra/llprimitive/llprimitive.cpp | 8 | ||||
-rw-r--r-- | indra/llprimitive/lltextureanim.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llhudeffectbeam.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llhudeffectlookat.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llhudeffectpointat.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llhudeffecttrail.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 48 |
16 files changed, 152 insertions, 152 deletions
diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index 1549c41e62..37904936d8 100644 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -107,11 +107,11 @@ BOOL LLGesture::trigger(const std::string& trigger_string) // NOT endian-neutral U8 *LLGesture::serialize(U8 *buffer) const { - htonmemcpy(buffer, &mKey, MVT_S8, 1); + htolememcpy(buffer, &mKey, MVT_S8, 1); buffer += sizeof(mKey); - htonmemcpy(buffer, &mMask, MVT_U32, 4); + htolememcpy(buffer, &mMask, MVT_U32, 4); buffer += sizeof(mMask); - htonmemcpy(buffer, mSoundItemID.mData, MVT_LLUUID, 16); + htolememcpy(buffer, mSoundItemID.mData, MVT_LLUUID, 16); buffer += 16; memcpy(buffer, mTrigger.c_str(), mTrigger.length() + 1); /* Flawfinder: ignore */ @@ -134,11 +134,11 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size) return buffer; } - htonmemcpy(&mKey, tmp, MVT_S8, 1); + htolememcpy(&mKey, tmp, MVT_S8, 1); tmp += sizeof(mKey); - htonmemcpy(&mMask, tmp, MVT_U32, 4); + htolememcpy(&mMask, tmp, MVT_U32, 4); tmp += sizeof(mMask); - htonmemcpy(mSoundItemID.mData, tmp, MVT_LLUUID, 16); + htolememcpy(mSoundItemID.mData, tmp, MVT_LLUUID, 16); tmp += 16; mTrigger.assign((char *)tmp); @@ -284,7 +284,7 @@ U8 *LLGestureList::serialize(U8 *buffer) const { // a single S32 serves as the header that tells us how many to read U32 count = mList.size(); - htonmemcpy(buffer, &count, MVT_S32, 4); + htolememcpy(buffer, &count, MVT_S32, 4); buffer += sizeof(count); for (S32 i = 0; i < count; i++) @@ -310,7 +310,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) return buffer; } - htonmemcpy(&count, tmp, MVT_S32, 4); + htolememcpy(&count, tmp, MVT_S32, 4); if (count > MAX_GESTURES) { diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index 3510f93805..6cf6af6437 100644 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp @@ -186,7 +186,7 @@ BOOL LLDataPackerBinaryBuffer::packString(const std::string& value, const char * if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value.c_str(), MVT_VARIABLE, length); + htolememcpy(mCurBufferp, value.c_str(), MVT_VARIABLE, length); } mCurBufferp += length; return success; @@ -213,12 +213,12 @@ BOOL LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const c if (mWriteEnabled) { - htonmemcpy(mCurBufferp, &size, MVT_S32, 4); + htolememcpy(mCurBufferp, &size, MVT_S32, 4); } mCurBufferp += 4; if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value, MVT_VARIABLE, size); + htolememcpy(mCurBufferp, value, MVT_VARIABLE, size); } mCurBufferp += size; return success; @@ -229,12 +229,12 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char { BOOL success = TRUE; success &= verifyLength(4, name); - htonmemcpy(&size, mCurBufferp, MVT_S32, 4); + htolememcpy(&size, mCurBufferp, MVT_S32, 4); mCurBufferp += 4; success &= verifyLength(size, name); if (success) { - htonmemcpy(value, mCurBufferp, MVT_VARIABLE, size); + htolememcpy(value, mCurBufferp, MVT_VARIABLE, size); mCurBufferp += size; } else @@ -253,7 +253,7 @@ BOOL LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, co if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value, MVT_VARIABLE, size); + htolememcpy(mCurBufferp, value, MVT_VARIABLE, size); } mCurBufferp += size; return success; @@ -264,7 +264,7 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const { BOOL success = TRUE; success &= verifyLength(size, name); - htonmemcpy(value, mCurBufferp, MVT_VARIABLE, size); + htolememcpy(value, mCurBufferp, MVT_VARIABLE, size); mCurBufferp += size; return success; } @@ -302,7 +302,7 @@ BOOL LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name) if (mWriteEnabled) { - htonmemcpy(mCurBufferp, &value, MVT_U16, 2); + htolememcpy(mCurBufferp, &value, MVT_U16, 2); } mCurBufferp += 2; return success; @@ -314,7 +314,7 @@ BOOL LLDataPackerBinaryBuffer::unpackU16(U16 &value, const char *name) BOOL success = TRUE; success &= verifyLength(sizeof(U16), name); - htonmemcpy(&value, mCurBufferp, MVT_U16, 2); + htolememcpy(&value, mCurBufferp, MVT_U16, 2); mCurBufferp += 2; return success; } @@ -327,7 +327,7 @@ BOOL LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name) if (mWriteEnabled) { - htonmemcpy(mCurBufferp, &value, MVT_U32, 4); + htolememcpy(mCurBufferp, &value, MVT_U32, 4); } mCurBufferp += 4; return success; @@ -339,7 +339,7 @@ BOOL LLDataPackerBinaryBuffer::unpackU32(U32 &value, const char *name) BOOL success = TRUE; success &= verifyLength(sizeof(U32), name); - htonmemcpy(&value, mCurBufferp, MVT_U32, 4); + htolememcpy(&value, mCurBufferp, MVT_U32, 4); mCurBufferp += 4; return success; } @@ -352,7 +352,7 @@ BOOL LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name) if (mWriteEnabled) { - htonmemcpy(mCurBufferp, &value, MVT_S32, 4); + htolememcpy(mCurBufferp, &value, MVT_S32, 4); } mCurBufferp += 4; return success; @@ -364,7 +364,7 @@ BOOL LLDataPackerBinaryBuffer::unpackS32(S32 &value, const char *name) BOOL success = TRUE; success &= verifyLength(sizeof(S32), name); - htonmemcpy(&value, mCurBufferp, MVT_S32, 4); + htolememcpy(&value, mCurBufferp, MVT_S32, 4); mCurBufferp += 4; return success; } @@ -377,7 +377,7 @@ BOOL LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name) if (mWriteEnabled) { - htonmemcpy(mCurBufferp, &value, MVT_F32, 4); + htolememcpy(mCurBufferp, &value, MVT_F32, 4); } mCurBufferp += 4; return success; @@ -389,7 +389,7 @@ BOOL LLDataPackerBinaryBuffer::unpackF32(F32 &value, const char *name) BOOL success = TRUE; success &= verifyLength(sizeof(F32), name); - htonmemcpy(&value, mCurBufferp, MVT_F32, 4); + htolememcpy(&value, mCurBufferp, MVT_F32, 4); mCurBufferp += 4; return success; } @@ -402,7 +402,7 @@ BOOL LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *nam if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value.mV, MVT_LLVector4, 16); + htolememcpy(mCurBufferp, value.mV, MVT_LLVector4, 16); } mCurBufferp += 16; return success; @@ -414,7 +414,7 @@ BOOL LLDataPackerBinaryBuffer::unpackColor4(LLColor4 &value, const char *name) BOOL success = TRUE; success &= verifyLength(16, name); - htonmemcpy(value.mV, mCurBufferp, MVT_LLVector4, 16); + htolememcpy(value.mV, mCurBufferp, MVT_LLVector4, 16); mCurBufferp += 16; return success; } @@ -427,7 +427,7 @@ BOOL LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *n if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value.mV, MVT_VARIABLE, 4); + htolememcpy(mCurBufferp, value.mV, MVT_VARIABLE, 4); } mCurBufferp += 4; return success; @@ -439,7 +439,7 @@ BOOL LLDataPackerBinaryBuffer::unpackColor4U(LLColor4U &value, const char *name) BOOL success = TRUE; success &= verifyLength(4, name); - htonmemcpy(value.mV, mCurBufferp, MVT_VARIABLE, 4); + htolememcpy(value.mV, mCurBufferp, MVT_VARIABLE, 4); mCurBufferp += 4; return success; } @@ -453,8 +453,8 @@ BOOL LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *n if (mWriteEnabled) { - htonmemcpy(mCurBufferp, &value.mV[0], MVT_F32, 4); - htonmemcpy(mCurBufferp+4, &value.mV[1], MVT_F32, 4); + htolememcpy(mCurBufferp, &value.mV[0], MVT_F32, 4); + htolememcpy(mCurBufferp+4, &value.mV[1], MVT_F32, 4); } mCurBufferp += 8; return success; @@ -466,8 +466,8 @@ BOOL LLDataPackerBinaryBuffer::unpackVector2(LLVector2 &value, const char *name) BOOL success = TRUE; success &= verifyLength(8, name); - htonmemcpy(&value.mV[0], mCurBufferp, MVT_F32, 4); - htonmemcpy(&value.mV[1], mCurBufferp+4, MVT_F32, 4); + htolememcpy(&value.mV[0], mCurBufferp, MVT_F32, 4); + htolememcpy(&value.mV[1], mCurBufferp+4, MVT_F32, 4); mCurBufferp += 8; return success; } @@ -480,7 +480,7 @@ BOOL LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *n if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value.mV, MVT_LLVector3, 12); + htolememcpy(mCurBufferp, value.mV, MVT_LLVector3, 12); } mCurBufferp += 12; return success; @@ -492,7 +492,7 @@ BOOL LLDataPackerBinaryBuffer::unpackVector3(LLVector3 &value, const char *name) BOOL success = TRUE; success &= verifyLength(12, name); - htonmemcpy(value.mV, mCurBufferp, MVT_LLVector3, 12); + htolememcpy(value.mV, mCurBufferp, MVT_LLVector3, 12); mCurBufferp += 12; return success; } @@ -504,7 +504,7 @@ BOOL LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *n if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value.mV, MVT_LLVector4, 16); + htolememcpy(mCurBufferp, value.mV, MVT_LLVector4, 16); } mCurBufferp += 16; return success; @@ -516,7 +516,7 @@ BOOL LLDataPackerBinaryBuffer::unpackVector4(LLVector4 &value, const char *name) BOOL success = TRUE; success &= verifyLength(16, name); - htonmemcpy(value.mV, mCurBufferp, MVT_LLVector4, 16); + htolememcpy(value.mV, mCurBufferp, MVT_LLVector4, 16); mCurBufferp += 16; return success; } @@ -528,7 +528,7 @@ BOOL LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name) if (mWriteEnabled) { - htonmemcpy(mCurBufferp, value.mData, MVT_LLUUID, 16); + htolememcpy(mCurBufferp, value.mData, MVT_LLUUID, 16); } mCurBufferp += 16; return success; @@ -540,7 +540,7 @@ BOOL LLDataPackerBinaryBuffer::unpackUUID(LLUUID &value, const char *name) BOOL success = TRUE; success &= verifyLength(16, name); - htonmemcpy(value.mData, mCurBufferp, MVT_LLUUID, 16); + htolememcpy(value.mData, mCurBufferp, MVT_LLUUID, 16); mCurBufferp += 16; return success; } diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp index 134154aa6c..fcda2a85f6 100644 --- a/indra/llmessage/llmail.cpp +++ b/indra/llmessage/llmail.cpp @@ -373,7 +373,7 @@ std::string LLMail::encryptIMEmailAddress(const LLUUID& from_agent_id, // Convert input data into a binary blob std::vector<U8> data; data.resize(data_size); - // *NOTE: This may suffer from endian issues. Could be htonmemcpy. + // *NOTE: This may suffer from endian issues. Could be htolememcpy. memcpy(&data[0], &time, 4); memcpy(&data[4], &from_agent_id.mData[0], UUID_BYTES); memcpy(&data[4 + UUID_BYTES], &to_agent_id.mData[0], UUID_BYTES); diff --git a/indra/llmessage/llmessagetemplate.cpp b/indra/llmessage/llmessagetemplate.cpp index c4c7e66703..e70e259436 100644 --- a/indra/llmessage/llmessagetemplate.cpp +++ b/indra/llmessage/llmessagetemplate.cpp @@ -47,7 +47,7 @@ void LLMsgVarData::addData(const void *data, S32 size, EMsgVariableType type, S3 { delete[] mData; // Delete it if it already exists mData = new U8[size]; - htonmemcpy(mData, data, mType, size); + htolememcpy(mData, data, mType, size); } } diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index 8d7c4c0282..5ac5f6c580 100644 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -689,14 +689,14 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat { case 1: sizeb = size; - htonmemcpy(&buffer[result], &sizeb, MVT_U8, 1); + htolememcpy(&buffer[result], &sizeb, MVT_U8, 1); break; case 2: sizeh = size; - htonmemcpy(&buffer[result], &sizeh, MVT_U16, 2); + htolememcpy(&buffer[result], &sizeh, MVT_U16, 2); break; case 4: - htonmemcpy(&buffer[result], &size, MVT_S32, 4); + htolememcpy(&buffer[result], &size, MVT_S32, 4); break; default: LL_ERRS() << "Attempting to build variable field with unknown size of " << size << LL_ENDL; diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 4e0c53c37e..6d5ad0ba08 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -645,15 +645,15 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender switch(data_size) { case 1: - htonmemcpy(&tsizeb, &buffer[decode_pos], MVT_U8, 1); + htolememcpy(&tsizeb, &buffer[decode_pos], MVT_U8, 1); tsize = tsizeb; break; case 2: - htonmemcpy(&tsizeh, &buffer[decode_pos], MVT_U16, 2); + htolememcpy(&tsizeh, &buffer[decode_pos], MVT_U16, 2); tsize = tsizeh; break; case 4: - htonmemcpy(&tsize, &buffer[decode_pos], MVT_U32, 4); + htolememcpy(&tsize, &buffer[decode_pos], MVT_U32, 4); break; default: LL_ERRS() << "Attempting to read variable field with unknown size of " << data_size << LL_ENDL; diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index c8b9d5d19f..32e0e2cc3b 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -245,7 +245,7 @@ void LLXfer::sendPacket(S32 packet_num) num_copy); } fdata_size += sizeof(S32); - htonmemcpy(fdata_buf,&mXferSize, MVT_S32, sizeof(S32)); + htolememcpy(fdata_buf,&mXferSize, MVT_S32, sizeof(S32)); } S32 encoded_packetnum = encodePacketNum(packet_num,last_packet); diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index f6c5d9e228..0af5a1b96d 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -860,10 +860,10 @@ void null_message_callback(LLMessageSystem *msg, void **data); // #if !defined( LL_BIG_ENDIAN ) && !defined( LL_LITTLE_ENDIAN ) -#error Unknown endianness for htonmemcpy. Did you miss a common include? +#error Unknown endianness for htolememcpy. Did you miss a common include? #endif -static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, size_t n) +static inline void *htolememcpy(void *vs, const void *vct, EMsgVariableType type, size_t n) { char *s = (char *)vs; const char *ct = (const char *)vct; @@ -886,7 +886,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_S16: if (n != 2) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN *(s + 1) = *(ct); @@ -901,7 +901,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_F32: if (n != 4) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN *(s + 3) = *(ct); @@ -918,7 +918,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_F64: if (n != 8) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN *(s + 7) = *(ct); @@ -938,12 +938,12 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_LLQuaternion: // We only send x, y, z and infer w (we set x, y, z to ensure that w >= 0) if (n != 12) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN - htonmemcpy(s + 8, ct + 8, MVT_F32, 4); - htonmemcpy(s + 4, ct + 4, MVT_F32, 4); - return(htonmemcpy(s, ct, MVT_F32, 4)); + htolememcpy(s + 8, ct + 8, MVT_F32, 4); + htolememcpy(s + 4, ct + 4, MVT_F32, 4); + return(htolememcpy(s, ct, MVT_F32, 4)); #else return(memcpy(s,ct,n)); /* Flawfinder: ignore */ #endif @@ -951,12 +951,12 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_LLVector3d: if (n != 24) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN - htonmemcpy(s + 16, ct + 16, MVT_F64, 8); - htonmemcpy(s + 8, ct + 8, MVT_F64, 8); - return(htonmemcpy(s, ct, MVT_F64, 8)); + htolememcpy(s + 16, ct + 16, MVT_F64, 8); + htolememcpy(s + 8, ct + 8, MVT_F64, 8); + return(htolememcpy(s, ct, MVT_F64, 8)); #else return(memcpy(s,ct,n)); /* Flawfinder: ignore */ #endif @@ -964,13 +964,13 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_LLVector4: if (n != 16) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN - htonmemcpy(s + 12, ct + 12, MVT_F32, 4); - htonmemcpy(s + 8, ct + 8, MVT_F32, 4); - htonmemcpy(s + 4, ct + 4, MVT_F32, 4); - return(htonmemcpy(s, ct, MVT_F32, 4)); + htolememcpy(s + 12, ct + 12, MVT_F32, 4); + htolememcpy(s + 8, ct + 8, MVT_F32, 4); + htolememcpy(s + 4, ct + 4, MVT_F32, 4); + return(htolememcpy(s, ct, MVT_F32, 4)); #else return(memcpy(s,ct,n)); /* Flawfinder: ignore */ #endif @@ -978,12 +978,12 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_U16Vec3: if (n != 6) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN - htonmemcpy(s + 4, ct + 4, MVT_U16, 2); - htonmemcpy(s + 2, ct + 2, MVT_U16, 2); - return(htonmemcpy(s, ct, MVT_U16, 2)); + htolememcpy(s + 4, ct + 4, MVT_U16, 2); + htolememcpy(s + 2, ct + 2, MVT_U16, 2); + return(htolememcpy(s, ct, MVT_U16, 2)); #else return(memcpy(s,ct,n)); /* Flawfinder: ignore */ #endif @@ -991,13 +991,13 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_U16Quat: if (n != 8) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN - htonmemcpy(s + 6, ct + 6, MVT_U16, 2); - htonmemcpy(s + 4, ct + 4, MVT_U16, 2); - htonmemcpy(s + 2, ct + 2, MVT_U16, 2); - return(htonmemcpy(s, ct, MVT_U16, 2)); + htolememcpy(s + 6, ct + 6, MVT_U16, 2); + htolememcpy(s + 4, ct + 4, MVT_U16, 2); + htolememcpy(s + 2, ct + 2, MVT_U16, 2); + return(htolememcpy(s, ct, MVT_U16, 2)); #else return(memcpy(s,ct,n)); /* Flawfinder: ignore */ #endif @@ -1005,15 +1005,15 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_S16Array: if (n % 2) { - LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; + LL_ERRS() << "Size argument passed to htolememcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN length = n % 2; for (i = 1; i < length; i++) { - htonmemcpy(s + i*2, ct + i*2, MVT_S16, 2); + htolememcpy(s + i*2, ct + i*2, MVT_S16, 2); } - return(htonmemcpy(s, ct, MVT_S16, 2)); + return(htolememcpy(s, ct, MVT_S16, 2)); #else return(memcpy(s,ct,n)); #endif @@ -1025,7 +1025,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, inline void *ntohmemcpy(void *s, const void *ct, EMsgVariableType type, size_t n) { - return(htonmemcpy(s,ct,type, n)); + return(htolememcpy(s,ct,type, n)); } inline const LLHost& LLMessageSystem::getReceivingInterface() const {return mLastReceivingIF;} diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 27d1bee9bd..040f9fb6c2 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1013,7 +1013,7 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa U64 exception_faces; U8 *start_loc = cur_ptr; - htonmemcpy(cur_ptr,data_ptr + (last_face_index * data_size), type, data_size); + htolememcpy(cur_ptr,data_ptr + (last_face_index * data_size), type, data_size); cur_ptr += data_size; for (face_index = last_face_index-1; face_index >= 0; face_index--) @@ -1059,7 +1059,7 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa *cur_ptr++ = (U8)(exception_faces & 0x7F); - htonmemcpy(cur_ptr,data_ptr + (face_index * data_size), type, data_size); + htolememcpy(cur_ptr,data_ptr + (face_index * data_size), type, data_size); cur_ptr += data_size; } } @@ -1070,7 +1070,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat { U8 *start_loc = cur_ptr; U64 i; - htonmemcpy(data_ptr,cur_ptr, type,data_size); + htolememcpy(data_ptr,cur_ptr, type,data_size); cur_ptr += data_size; for (i = 1; i < face_count; i++) @@ -1095,7 +1095,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat { if (i & 0x01) { - htonmemcpy(data_ptr+(j*data_size),cur_ptr,type,data_size); + htolememcpy(data_ptr+(j*data_size),cur_ptr,type,data_size); LL_DEBUGS("TEFieldDecode") << "Assigning " ; char foo[64]; sprintf(foo,"%x %x",*(data_ptr+(j*data_size)), *(data_ptr+(j*data_size)+1)); diff --git a/indra/llprimitive/lltextureanim.cpp b/indra/llprimitive/lltextureanim.cpp index 031a315d62..7c48e57a1a 100644 --- a/indra/llprimitive/lltextureanim.cpp +++ b/indra/llprimitive/lltextureanim.cpp @@ -94,9 +94,9 @@ void LLTextureAnim::packTAMessage(LLMessageSystem *mesgsys) const data[1] = mFace; data[2] = mSizeX; data[3] = mSizeY; - htonmemcpy(data + 4, &mStart, MVT_F32, sizeof(F32)); - htonmemcpy(data + 8, &mLength, MVT_F32, sizeof(F32)); - htonmemcpy(data + 12, &mRate, MVT_F32, sizeof(F32)); + htolememcpy(data + 4, &mStart, MVT_F32, sizeof(F32)); + htolememcpy(data + 8, &mLength, MVT_F32, sizeof(F32)); + htolememcpy(data + 12, &mRate, MVT_F32, sizeof(F32)); mesgsys->addBinaryDataFast(_PREHASH_TextureAnim, data, TA_BLOCK_SIZE); } @@ -109,9 +109,9 @@ void LLTextureAnim::packTAMessage(LLDataPacker &dp) const data[1] = mFace; data[2] = mSizeX; data[3] = mSizeY; - htonmemcpy(data + 4, &mStart, MVT_F32, sizeof(F32)); - htonmemcpy(data + 8, &mLength, MVT_F32, sizeof(F32)); - htonmemcpy(data + 12, &mRate, MVT_F32, sizeof(F32)); + htolememcpy(data + 4, &mStart, MVT_F32, sizeof(F32)); + htolememcpy(data + 8, &mLength, MVT_F32, sizeof(F32)); + htolememcpy(data + 12, &mRate, MVT_F32, sizeof(F32)); dp.packBinaryData(data, TA_BLOCK_SIZE, "TextureAnimation"); } @@ -146,9 +146,9 @@ void LLTextureAnim::unpackTAMessage(LLMessageSystem *mesgsys, const S32 block_nu mSizeX = llmax((U8)1, data[2]); mSizeY = llmax((U8)1, data[3]); } - htonmemcpy(&mStart, data + 4, MVT_F32, sizeof(F32)); - htonmemcpy(&mLength, data + 8, MVT_F32, sizeof(F32)); - htonmemcpy(&mRate, data + 12, MVT_F32, sizeof(F32)); + htolememcpy(&mStart, data + 4, MVT_F32, sizeof(F32)); + htolememcpy(&mLength, data + 8, MVT_F32, sizeof(F32)); + htolememcpy(&mRate, data + 12, MVT_F32, sizeof(F32)); } void LLTextureAnim::unpackTAMessage(LLDataPacker &dp) @@ -170,9 +170,9 @@ void LLTextureAnim::unpackTAMessage(LLDataPacker &dp) mFace = data[1]; mSizeX = data[2]; mSizeY = data[3]; - htonmemcpy(&mStart, data + 4, MVT_F32, sizeof(F32)); - htonmemcpy(&mLength, data + 8, MVT_F32, sizeof(F32)); - htonmemcpy(&mRate, data + 12, MVT_F32, sizeof(F32)); + htolememcpy(&mStart, data + 4, MVT_F32, sizeof(F32)); + htolememcpy(&mLength, data + 8, MVT_F32, sizeof(F32)); + htolememcpy(&mRate, data + 12, MVT_F32, sizeof(F32)); } LLSD LLTextureAnim::asLLSD() const diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index 54e683e048..d1d83e6e03 100644 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -90,7 +90,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) memset(packed_data, 0, 41); if (mSourceObject) { - htonmemcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); } if (mTargetObject) @@ -104,11 +104,11 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) if (mTargetObject) { - htonmemcpy(&(packed_data[17]), mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[17]), mTargetObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[17]), mTargetPos.mdV, MVT_LLVector3d, 24); + htolememcpy(&(packed_data[17]), mTargetPos.mdV, MVT_LLVector3d, 24); } mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, 41); } @@ -131,7 +131,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 41, blocknum); - htonmemcpy(source_id.mData, packed_data, MVT_LLUUID, 16); + htolememcpy(source_id.mData, packed_data, MVT_LLUUID, 16); LLViewerObject *objp = gObjectList.findObject(source_id); if (objp) @@ -143,7 +143,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) if (use_target_object) { - htonmemcpy(target_id.mData, &packed_data[17], MVT_LLUUID, 16); + htolememcpy(target_id.mData, &packed_data[17], MVT_LLUUID, 16); LLViewerObject *objp = gObjectList.findObject(target_id); if (objp) @@ -153,7 +153,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } else { - htonmemcpy(new_target.mdV, &(packed_data[17]), MVT_LLVector3d, 24); + htolememcpy(new_target.mdV, &(packed_data[17]), MVT_LLVector3d, 24); setTargetPos(new_target); } diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index f46152dcec..6898dce7b1 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -269,29 +269,29 @@ void LLHUDEffectLookAt::packData(LLMessageSystem *mesgsys) if (mSourceObject) { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); } // pack both target object and position // position interpreted as offset if target object is non-null if (mTargetObject) { - htonmemcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); } - htonmemcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); + htolememcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); U8 lookAtTypePacked = (U8)mTargetType; - htonmemcpy(&(packed_data[LOOKAT_TYPE]), &lookAtTypePacked, MVT_U8, 1); + htolememcpy(&(packed_data[LOOKAT_TYPE]), &lookAtTypePacked, MVT_U8, 1); mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, PKT_SIZE); @@ -325,7 +325,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum); - htonmemcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); + htolememcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); LLViewerObject *objp = gObjectList.findObject(source_id); if (objp && objp->isAvatar()) @@ -338,11 +338,11 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) return; } - htonmemcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); + htolememcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); objp = gObjectList.findObject(target_id); - htonmemcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); + htolememcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); if (objp) { @@ -358,7 +358,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } U8 lookAtTypeUnpacked = 0; - htonmemcpy(&lookAtTypeUnpacked, &(packed_data[LOOKAT_TYPE]), MVT_U8, 1); + htolememcpy(&lookAtTypeUnpacked, &(packed_data[LOOKAT_TYPE]), MVT_U8, 1); mTargetType = (ELookAtType)lookAtTypeUnpacked; if (mTargetType == LOOKAT_TARGET_NONE) diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index cc772c8f5c..ecf6d42d69 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -107,28 +107,28 @@ void LLHUDEffectPointAt::packData(LLMessageSystem *mesgsys) if (mSourceObject) { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); } // pack both target object and position // position interpreted as offset if target object is non-null if (mTargetObject) { - htonmemcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); } - htonmemcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); + htolememcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); U8 pointAtTypePacked = (U8)mTargetType; - htonmemcpy(&(packed_data[POINTAT_TYPE]), &pointAtTypePacked, MVT_U8, 1); + htolememcpy(&(packed_data[POINTAT_TYPE]), &pointAtTypePacked, MVT_U8, 1); mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, PKT_SIZE); @@ -164,10 +164,10 @@ void LLHUDEffectPointAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum); - htonmemcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); - htonmemcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); - htonmemcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); - htonmemcpy(&pointAtTypeUnpacked, &(packed_data[POINTAT_TYPE]), MVT_U8, 1); + htolememcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); + htolememcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); + htolememcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); + htolememcpy(&pointAtTypeUnpacked, &(packed_data[POINTAT_TYPE]), MVT_U8, 1); LLViewerObject *objp = gObjectList.findObject(source_id); if (objp && objp->isAvatar()) diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index fc6efdb840..2ba8aa422b 100644 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -87,15 +87,15 @@ void LLHUDEffectSpiral::packData(LLMessageSystem *mesgsys) if (mSourceObject) { - htonmemcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); } if (mTargetObject) { - htonmemcpy(packed_data + 16, mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(packed_data + 16, mTargetObject->mID.mData, MVT_LLUUID, 16); } if (!mPositionGlobal.isExactlyZero()) { - htonmemcpy(packed_data + 32, mPositionGlobal.mdV, MVT_LLVector3d, 24); + htolememcpy(packed_data + 32, mPositionGlobal.mdV, MVT_LLVector3d, 24); } mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, 56); } @@ -116,9 +116,9 @@ void LLHUDEffectSpiral::unpackData(LLMessageSystem *mesgsys, S32 blocknum) mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, EFFECT_SIZE, blocknum, EFFECT_SIZE); - htonmemcpy(object_id.mData, packed_data, MVT_LLUUID, 16); - htonmemcpy(target_object_id.mData, packed_data + 16, MVT_LLUUID, 16); - htonmemcpy(mPositionGlobal.mdV, packed_data + 32, MVT_LLVector3d, 24); + htolememcpy(object_id.mData, packed_data, MVT_LLUUID, 16); + htolememcpy(target_object_id.mData, packed_data + 16, MVT_LLUUID, 16); + htolememcpy(mPositionGlobal.mdV, packed_data + 32, MVT_LLVector3d, 24); LLViewerObject *objp = NULL; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b726e841f8..4c268ae273 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4163,20 +4163,20 @@ void LLSelectMgr::packMultipleUpdate(LLSelectNode* node, void *user_data) if (type & UPD_POSITION) { - htonmemcpy(&data[offset], &(object->getPosition().mV), MVT_LLVector3, 12); + htolememcpy(&data[offset], &(object->getPosition().mV), MVT_LLVector3, 12); offset += 12; } if (type & UPD_ROTATION) { LLQuaternion quat = object->getRotation(); LLVector3 vec = quat.packToVector3(); - htonmemcpy(&data[offset], &(vec.mV), MVT_LLQuaternion, 12); + htolememcpy(&data[offset], &(vec.mV), MVT_LLQuaternion, 12); offset += 12; } if (type & UPD_SCALE) { //LL_INFOS() << "Sending object scale " << object->getScale() << LL_ENDL; - htonmemcpy(&data[offset], &(object->getScale().mV), MVT_LLVector3, 12); + htolememcpy(&data[offset], &(object->getScale().mV), MVT_LLVector3, 12); offset += 12; } gMessageSystem->addBinaryDataFast(_PREHASH_Data, data, offset); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ec1095813b..7381504f01 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1279,7 +1279,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { case (60 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1287,23 +1287,23 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, this_update_precision = 32; // this is a terse update // pos - htonmemcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // vel - htonmemcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // acc - htonmemcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // theta { LLVector3 vec; - htonmemcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); new_rot.unpackFromVector3(vec); } count += sizeof(LLVector3); // omega - htonmemcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); if (new_angv.isExactlyZero()) { // reset rotation time @@ -1319,7 +1319,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, break; case(32 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1329,7 +1329,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // This is a terse 16 update, so treat data as an array of U16's. #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1340,7 +1340,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_pos_parent.mV[VZ] = U16_to_F32(val[VZ], MIN_HEIGHT, MAX_HEIGHT); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1351,7 +1351,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size))); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1362,7 +1362,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size))); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Quat, 4); + htolememcpy(valswizzle, &data[count], MVT_U16Quat, 4); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1374,7 +1374,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_rot.mQ[VW] = U16_to_F32(val[VW], -1.f, 1.f); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1570,7 +1570,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { case(60 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1578,23 +1578,23 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // this is a terse 32 update // pos this_update_precision = 32; - htonmemcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // vel - htonmemcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // acc - htonmemcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // theta { LLVector3 vec; - htonmemcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); new_rot.unpackFromVector3(vec); } count += sizeof(LLVector3); // omega - htonmemcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); if (new_angv.isExactlyZero()) { // reset rotation time @@ -1610,7 +1610,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, break; case(32 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1620,7 +1620,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, test_pos_parent.quantize16(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1631,7 +1631,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_pos_parent.mV[VZ] = U16_to_F32(val[VZ], MIN_HEIGHT, MAX_HEIGHT); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1642,7 +1642,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size)); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1653,7 +1653,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size)); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Quat, 8); + htolememcpy(valswizzle, &data[count], MVT_U16Quat, 8); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1665,7 +1665,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_rot.mQ[VW] = U16_to_F32(val[VW], -1.f, 1.f); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; |