Browse Source

Replace MemMove, MemCopy, and MemCmp.

Darryl Pogue 13 years ago committed by Adam Johnson
parent
commit
a14a171774
  1. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp
  2. 8
      Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp
  3. 8
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp
  4. 4
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp
  5. 2
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp
  6. 16
      Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp
  7. 2
      Sources/Plasma/NucleusLib/pnNetCli/pnNcUtils.cpp
  8. 2
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Db/pnNpSrv2Db.cpp
  9. 2
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Log/pnNpSrv2Log.cpp
  10. 2
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Mcp/pnNpSrv2Mcp.cpp
  11. 2
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Score/pnNpSrv2Score.cpp
  12. 2
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2State/pnNpSrv2State.cpp
  13. 2
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Vault/pnNpSrv2Vault.cpp
  14. 6
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp
  15. 6
      Sources/Plasma/NucleusLib/pnUUID/pnUUID_Win32.cpp
  16. 2
      Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Misc.cpp
  17. 4
      Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h
  18. 2
      Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp
  19. 6
      Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp
  20. 2
      Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.cpp
  21. 2
      Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp
  22. 6
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  23. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp
  24. 4
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp
  25. 16
      Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp

2
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp

@ -1927,7 +1927,7 @@ void pfGUIMultiLineEditCtrl::DeleteLinesFromTop(int numLines)
hitEnd = false;
uint32_t newBufferStart = curChar + 1; // +1 so we eat the newline as well
uint32_t newBufferLen = bufferLen - newBufferStart;
MemCopy(buffer, buffer + newBufferStart, newBufferLen * sizeof(uint16_t)); // copy all bytes after the newline to the beginning
memcpy(buffer, buffer + newBufferStart, newBufferLen * sizeof(uint16_t)); // copy all bytes after the newline to the beginning
memset(buffer + newBufferLen, 0, (bufferLen - newBufferLen) * sizeof(uint16_t)); // fill out the rest of the buffer with null chars
bufferLen = newBufferLen;
break;

8
Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.cpp

@ -287,7 +287,7 @@ pfGameMgrMsg::~pfGameMgrMsg () {
void pfGameMgrMsg::Set (const GameMsgHeader & msg) {
netMsg = (GameMsgHeader *)malloc(msg.messageBytes);
MemCopy(netMsg, &msg, msg.messageBytes);
memcpy(netMsg, &msg, msg.messageBytes);
}
@ -314,7 +314,7 @@ pfGameCliMsg::~pfGameCliMsg () {
void pfGameCliMsg::Set (pfGameCli * cli, const GameMsgHeader & msg) {
netMsg = (GameMsgHeader *)malloc(msg.messageBytes);
MemCopy(netMsg, &msg, msg.messageBytes);
memcpy(netMsg, &msg, msg.messageBytes);
gameCli = cli;
}
@ -423,7 +423,7 @@ void pfGameMgr::CreateGame (
msg->createOptions = createOptions;
msg->messageBytes = msgBytes;
msg->createDataBytes = initBytes;
MemCopy(msg->createData, initData, initBytes);
memcpy(msg->createData, initData, initBytes);
GameMgrSend(msg, NEWZERO(JoinTransState)(receiver));
@ -454,7 +454,7 @@ void pfGameMgr::JoinCommonGame (
msg->createOptions = kGameJoinCommon;
msg->messageBytes = msgBytes;
msg->createDataBytes = initBytes;
MemCopy(msg->createData, initData, initBytes);
memcpy(msg->createData, initData, initBytes);
GameMgrSend(msg, NEWZERO(JoinTransState)(receiver));

8
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp

@ -334,7 +334,7 @@ static NtOpSocketWrite * SocketQueueAsyncWrite (
bytesLeft = min(bytesLeft, bytes);
if (bytesLeft) {
PerfAddCounter(kAsyncPerfSocketBytesWaitQueued, bytesLeft);
MemCopy(lastQueuedWrite->write.buffer + lastQueuedWrite->write.bytes, data, bytesLeft);
memcpy(lastQueuedWrite->write.buffer + lastQueuedWrite->write.bytes, data, bytesLeft);
lastQueuedWrite->write.bytes += bytesLeft;
data += bytesLeft;
if (0 == (bytes -= bytesLeft))
@ -370,7 +370,7 @@ static NtOpSocketWrite * SocketQueueAsyncWrite (
op->write.buffer = (uint8_t *) (op + 1);
op->write.bytes = bytes;
op->write.bytesProcessed = bytes;
MemCopy(op->write.buffer, data, bytes);
memcpy(op->write.buffer, data, bytes);
InterlockedIncrement(&sock->ioCount);
PerfAddCounter(kAsyncPerfSocketBytesWaitQueued, bytes);
@ -1050,7 +1050,7 @@ void INtSocketOpCompleteSocketRead (
}
if (sock->opRead.read.bytesProcessed) {
MemMove(
memmove(
sock->buffer,
sock->buffer + sock->opRead.read.bytesProcessed,
sock->bytesLeft
@ -1209,7 +1209,7 @@ void NtSocketConnect (
op->hSocket = INVALID_SOCKET;
op->failTimeMs = connectMs ? connectMs : kConnectTimeMs;
if (0 != (op->sendBytes = sendBytes))
MemCopy(op->sendData, sendData, sendBytes);
memcpy(op->sendData, sendData, sendBytes);
else
op->sendData[0] = kConnTypeNil;

4
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp

@ -528,7 +528,7 @@ void CSocket::OnReadReady () {
if (notify.bytesProcessed >= m_readBytes)
m_readBytes = 0;
else if (notify.bytesProcessed) {
MemMove(
memmove(
&m_readBuffer[0],
&m_readBuffer[notify.bytesProcessed],
m_readBytes - notify.bytesProcessed
@ -578,7 +578,7 @@ void CSocket::OnWriteReady () {
if ((unsigned)result == m_sendQueue.Bytes())
m_sendQueue.Clear();
else if (result) {
MemMove(
memmove(
&m_sendQueue[0],
&m_sendQueue[result],
m_sendQueue.Bytes() - result

2
Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp

@ -453,7 +453,7 @@ void AsyncLogWriteMsg (
AllocLogBuffer_CS(index);
// Add new data to the log buffer
MemCopy(s_logBuf[index] + s_logPos[index], buffer, chars);
memcpy(s_logBuf[index] + s_logPos[index], buffer, chars);
s_logPos[index] += chars;
// Write, flush and close file immediately if this is a fatal error

16
Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp

@ -191,7 +191,7 @@ static void PutBufferOnWire (NetCli * cli, void * data, unsigned bytes) {
if (cli->mode == kNetCliModeEncrypted && cli->cryptOut) {
temp = (uint8_t *)malloc(bytes);
MemCopy(temp, data, bytes);
memcpy(temp, data, bytes);
CryptEncrypt(cli->cryptOut, bytes, temp);
data = temp;
}
@ -222,7 +222,7 @@ static void AddToSendBuffer (
// Let the OS fragment oversize buffers
FlushSendBuffer(cli);
void * heap = malloc(bytes);
MemCopy(heap, data, bytes);
memcpy(heap, data, bytes);
PutBufferOnWire(cli, heap, bytes);
free(heap);
}
@ -665,7 +665,7 @@ static void ClientConnect (NetCli * cli) {
memset(&cli->seed, 0, sizeof(cli->seed));
unsigned bytes;
unsigned char * data = clientSeed.GetData_LE(&bytes);
MemCopy(cli->seed, data, min(bytes, sizeof(cli->seed)));
memcpy(cli->seed, data, min(bytes, sizeof(cli->seed)));
delete [] data;
}
@ -677,7 +677,7 @@ static void ClientConnect (NetCli * cli) {
ASSERTMSG(bytes <= sizeof(msg.dh_y_data), "4");
msg.message = kNetCliCli2SrvConnect;
msg.length = (uint8_t) (sizeof(msg) - sizeof(msg.dh_y_data) + bytes);
MemCopy(msg.dh_y_data, data, bytes);
memcpy(msg.dh_y_data, data, bytes);
AsyncSocketSend(cli->sock, &msg, msg.length);
delete [] data;
}
@ -704,7 +704,7 @@ static bool ServerRecvConnect (
NetCli_Srv2Cli_Encrypt reply;
reply.message = kNetCliSrv2CliEncrypt;
reply.length = seedLength == 0 ? 0 : sizeof(reply); // reply with empty seed if we got empty seed (this means: no encryption)
MemCopy(reply.serverSeed, cli->seed, sizeof(reply.serverSeed));
memcpy(reply.serverSeed, cli->seed, sizeof(reply.serverSeed));
AsyncSocketSend(cli->sock, &reply, reply.length);
}
@ -727,7 +727,7 @@ static bool ServerRecvConnect (
memset(&clientSeed, 0, sizeof(clientSeed));
unsigned bytes;
unsigned char * data = clientSeedValue.GetData_LE(&bytes);
MemCopy(clientSeed, data, min(bytes, sizeof(clientSeed)));
memcpy(clientSeed, data, min(bytes, sizeof(clientSeed)));
delete [] data;
}
@ -952,7 +952,7 @@ static void SetConnSeed (
const uint8_t seedData[]
) {
if (seedBytes)
MemCopy(cli->seed, seedData, min(sizeof(cli->seed), seedBytes));
memcpy(cli->seed, seedData, min(sizeof(cli->seed), seedBytes));
else
CryptCreateRandomSeed(sizeof(cli->seed), cli->seed);
}
@ -1113,7 +1113,7 @@ bool NetCliDispatch (
if (cli->cryptIn) {
temp = (uint8_t *)malloc(bytes);
MemCopy(temp, data, bytes);
memcpy(temp, data, bytes);
CryptDecrypt(cli->cryptIn, bytes, temp);
data = temp;
}

2
Sources/Plasma/NucleusLib/pnNetCli/pnNcUtils.cpp

@ -74,7 +74,7 @@ bool CInputAccumulator::Get (unsigned count, void * dest) {
if (curr + count > buffer.Term())
return false;
// LogMsg(kLogPerf, L"Removing %u bytes from accumulator %p", count, this);
MemCopy(dest, curr, count);
memcpy(dest, curr, count);
curr += count;
return true;
}

2
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Db/pnNpSrv2Db.cpp

@ -84,7 +84,7 @@ bool Srv2DbValidateConnect (
}
memset(connectPtr, 0, sizeof(*connectPtr));
MemCopy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
memcpy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
listen->bytesProcessed += connect.dataBytes;
return true;

2
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Log/pnNpSrv2Log.cpp

@ -80,7 +80,7 @@ bool Srv2LogValidateConnect (
return false;
memset(connectPtr, 0, sizeof(*connectPtr));
MemCopy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
memcpy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
listen->bytesProcessed += connect.dataBytes;
return true;

2
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Mcp/pnNpSrv2Mcp.cpp

@ -78,7 +78,7 @@ bool Srv2McpValidateConnect (
return false;
memset(connectPtr, 0, sizeof(*connectPtr));
MemCopy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
memcpy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
listen->bytesProcessed += connect.dataBytes;
return true;

2
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Score/pnNpSrv2Score.cpp

@ -79,7 +79,7 @@ bool Srv2ScoreValidateConnect (
return false;
memset(connectPtr, 0, sizeof(*connectPtr));
MemCopy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
memcpy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
listen->bytesProcessed += connect.dataBytes;
return true;

2
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2State/pnNpSrv2State.cpp

@ -79,7 +79,7 @@ bool Srv2StateValidateConnect (
return false;
memset(connectPtr, 0, sizeof(*connectPtr));
MemCopy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
memcpy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
listen->bytesProcessed += connect.dataBytes;
return true;

2
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Srv2Vault/pnNpSrv2Vault.cpp

@ -78,7 +78,7 @@ bool Srv2VaultValidateConnect (
return false;
memset(connectPtr, 0, sizeof(*connectPtr));
MemCopy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
memcpy(connectPtr, &connect, min(sizeof(*connectPtr), connect.dataBytes));
listen->bytesProcessed += connect.dataBytes;
return true;

6
Sources/Plasma/NucleusLib/pnNetProtocol/Private/pnNpCommon.cpp

@ -91,7 +91,7 @@ static inline void IReadArray (T ** buf, unsigned * elems, uint8_t ** buffer, un
T * src = (T *)*buffer;
delete *buf;
*buf = (T *)malloc(bytes);
MemCopy(*buf, src, bytes);
memcpy(*buf, src, bytes);
*buffer += bytes;
*bufsz -= bytes;
}
@ -119,7 +119,7 @@ static inline void IWriteArray (const T buf[], unsigned elems, ARRAY(uint8_t) *
unsigned bytes = elems * sizeof(T);
IWriteValue(bytes, buffer);
T * dst = (T *) buffer->New(bytes);
MemCopy(dst, buf, bytes);
memcpy(dst, buf, bytes);
}
//============================================================================
@ -1117,7 +1117,7 @@ void * CSrvPackBuffer::Alloc (unsigned bytes) {
//============================================================================
void CSrvPackBuffer::AddData (const void * ptr, unsigned bytes) {
MemCopy(Alloc(bytes), ptr, bytes);
memcpy(Alloc(bytes), ptr, bytes);
}
//============================================================================

6
Sources/Plasma/NucleusLib/pnUUID/pnUUID_Win32.cpp

@ -51,7 +51,7 @@ COMPILER_ASSERT(msizeof(Uuid, data) == msizeof(plUUID, fData));
plUUID::plUUID( const Uuid & uuid )
{
MemCopy(fData, uuid.data, sizeof(fData));
memcpy(fData, uuid.data, sizeof(fData));
}
void plUUID::Clear()
@ -84,12 +84,12 @@ void plUUID::CopyFrom( const plUUID * v ) {
}
void plUUID::CopyFrom( const plUUID & v ) {
MemCopy(fData, v.fData, sizeof(fData));
memcpy(fData, v.fData, sizeof(fData));
}
plUUID::operator Uuid () const {
Uuid uuid;
MemCopy(uuid.data, fData, sizeof(uuid.data));
memcpy(uuid.data, fData, sizeof(uuid.data));
return uuid;
}

2
Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Misc.cpp

@ -218,7 +218,7 @@ DONE:
// If this is an AMD CPU, check for 3DNow support
const char * vendorAmd = "AuthenticAMD";
if (!MemCmp(vendorAmd, cpuVendor, 12)) {
if (!memcmp(vendorAmd, cpuVendor, 12)) {
if (extended & (1 << 31))
*cpuCaps |= kCpuCap3dNow;
}

4
Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h

@ -158,7 +158,7 @@ TBuffer<T> & TBuffer<T>::operator= (const TBuffer<T> & source) {
template<class T>
bool TBuffer<T>::operator== (const TBuffer<T> & source) const {
unsigned size = MemSize(m_data);
return (size == MemSize(source.m_data)) && !MemCmp(m_data, source.m_data, size);
return (size == MemSize(source.m_data)) && !memcmp(m_data, source.m_data, size);
}
//===========================================================================
@ -300,7 +300,7 @@ public:
//===========================================================================
template<class T>
void TArrayCopyBits<T>::Assign (T * dest, const T source[], unsigned count) {
MemMove(dest, source, count * sizeof(T));
memmove(dest, source, count * sizeof(T));
}
//===========================================================================

2
Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp

@ -168,7 +168,7 @@ static void Rc4Codec (
// RC4 uses the same algorithm to both encrypt and decrypt
uint8_t * temp = (uint8_t *)malloc(bytes);
RC4((RC4_KEY *)key->handle, bytes, (const unsigned char *)data, temp);
MemCopy(data, temp, bytes);
memcpy(data, temp, bytes);
free(temp);
}

6
Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp

@ -151,7 +151,7 @@ bool IParseForSubst (
block->isVar = false;
block->strLen = strLen;
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, src, strLen * sizeof(chartype));
memcpy(block->data, src, strLen * sizeof(chartype));
dest->blocks.Add(block);
}
@ -170,7 +170,7 @@ bool IParseForSubst (
block->isVar = true;
block->strLen = strLen;
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, varStart, strLen * sizeof(chartype));
memcpy(block->data, varStart, strLen * sizeof(chartype));
dest->blocks.Add(block);
@ -184,7 +184,7 @@ bool IParseForSubst (
block->isVar = false;
block->strLen = strLen;
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, src, strLen * sizeof(chartype));
memcpy(block->data, src, strLen * sizeof(chartype));
dest->blocks.Add(block);
}

2
Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.cpp

@ -100,6 +100,6 @@ const wchar_t * GuidToHex (const Uuid & uuid, wchar_t * dst, unsigned chars) {
bool GuidFromHex (const uint8_t buf[], unsigned length, Uuid * uuid) {
ASSERT(length == msizeof(Uuid, data));
MemCopy(uuid->data, buf, msizeof(Uuid, data));
memcpy(uuid->data, buf, msizeof(Uuid, data));
return true;
}

2
Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp

@ -317,7 +317,7 @@ bool plDSoundBuffer::SetupStreamingSource(void *data, unsigned bytes)
if(!size)
break;
MemCopy(bufferData, pData, size);
memcpy(bufferData, pData, size);
pData += size;
bytes-= size;
numBuffersToQueue++;

6
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -2716,7 +2716,7 @@ bool LoginRequestTrans::Recv (
unsigned memSize = min(arrsize(s_encryptionKey), arrsize(reply.encryptionKey));
memSize *= sizeof(uint32_t);
MemCopy(s_encryptionKey, reply.encryptionKey, memSize);
memcpy(s_encryptionKey, reply.encryptionKey, memSize);
}
break;
@ -3635,7 +3635,7 @@ bool FileDownloadRequestTrans::Recv (
writeTrans->bytes = reply.chunkSize;
writeTrans->offset = reply.chunkOffset;
writeTrans->data = (uint8_t *)malloc(reply.chunkSize);
MemCopy(writeTrans->data, reply.chunkData, reply.chunkSize);
memcpy(writeTrans->data, reply.chunkData, reply.chunkSize);
NetTransSend(writeTrans);
}
@ -5286,7 +5286,7 @@ void NetCliAuthGetEncryptionKey (
) {
unsigned memSize = min(arrsize(s_encryptionKey), size);
memSize *= sizeof(uint32_t);
MemCopy(key, s_encryptionKey, memSize);
memcpy(key, s_encryptionKey, memSize);
}
//============================================================================

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp

@ -1196,7 +1196,7 @@ bool DownloadRequestTrans::Recv (
writeTrans->writer = m_writer;
writeTrans->bytes = byteCount;
writeTrans->data = (uint8_t *)malloc(byteCount);
MemCopy(writeTrans->data, data, byteCount);
memcpy(writeTrans->data, data, byteCount);
NetTransSend(writeTrans);
}
m_totalBytesReceived += byteCount;

4
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp

@ -457,7 +457,7 @@ static bool Recv_PropagateBuffer (
trans->bufferType = reply.type;
trans->bufferBytes = reply.bytes;
trans->bufferData = (uint8_t *)malloc(reply.bytes);
MemCopy(trans->bufferData, reply.buffer, reply.bytes);
memcpy(trans->bufferData, reply.buffer, reply.bytes);
NetTransSend(trans);
return true;
@ -474,7 +474,7 @@ static bool Recv_GameMgrMsg (
RcvdGameMgrMsgTrans * trans = new RcvdGameMgrMsgTrans;
trans->bufferBytes = reply.bytes;
trans->bufferData = (uint8_t *)malloc(reply.bytes);
MemCopy(trans->bufferData, reply.buffer, reply.bytes);
memcpy(trans->bufferData, reply.buffer, reply.bytes);
NetTransSend(trans);
return true;

16
Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.cpp

@ -337,7 +337,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
StrToUnicode(src, info.GetAgeFilename(), arrsize(src));
unsigned len = StrLen(src);
wchar_t * dst = buf.New(len);
MemCopy(dst, src, len * sizeof(src[0]));
memcpy(dst, src, len * sizeof(src[0]));
}
break;
@ -346,7 +346,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
StrToUnicode(src, info.GetAgeInstanceName(), arrsize(src));
unsigned len = StrLen(src);
wchar_t * dst = buf.New(len);
MemCopy(dst, src, len * sizeof(src[0]));
memcpy(dst, src, len * sizeof(src[0]));
}
break;
@ -355,7 +355,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
StrToUnicode(src, info.GetAgeUserDefinedName(), arrsize(src));
unsigned len = StrLen(src);
wchar_t * dst = buf.New(len);
MemCopy(dst, src, len * sizeof(src[0]));
memcpy(dst, src, len * sizeof(src[0]));
}
break;
@ -364,7 +364,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
StrToUnicode(src, info.GetAgeDescription(), arrsize(src));
unsigned len = StrLen(src);
wchar_t * dst = buf.New(len);
MemCopy(dst, src, len * sizeof(src[0]));
memcpy(dst, src, len * sizeof(src[0]));
}
break;
@ -374,7 +374,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
GuidToString(guid, src, arrsize(src));
unsigned len = StrLen(src);
wchar_t * dst = buf.New(len);
MemCopy(dst, src, len * sizeof(src[0]));
memcpy(dst, src, len * sizeof(src[0]));
}
break;
@ -383,7 +383,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
StrPrintf(src, arrsize(src), L"%u", info.GetAgeLanguage());
unsigned len = StrLen(src);
wchar_t * dst = buf.New(len);
MemCopy(dst, src, len * sizeof(src[0]));
memcpy(dst, src, len * sizeof(src[0]));
}
break;
@ -392,7 +392,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
StrPrintf(src, arrsize(src), L"%u", info.GetAgeSequenceNumber());
unsigned len = StrLen(src);
wchar_t * dst = buf.New(len);
MemCopy(dst, src, len * sizeof(src[0]));
memcpy(dst, src, len * sizeof(src[0]));
}
break;
@ -790,7 +790,7 @@ void VaultAgeLinkNode::GetSpawnPoints (plSpawnPointVec * out) const {
char str[2048];
memset(&str, 0, sizeof(str));
MemCopy(str, spawnPoints, min(spawnPointsLen, arrsize(str) - 1));
memcpy(str, spawnPoints, min(spawnPointsLen, arrsize(str) - 1));
char token1[ 1024 ];
hsStringTokenizer izer1( str, ";" );

Loading…
Cancel
Save