From 5a19f89d6c8eb148e6bb7b450f702b666f685ed1 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sat, 13 Dec 2014 10:52:12 +0000 Subject: MoveMemory -> memmove git-svn-id: http://svn.miranda-ng.org/main/trunk@11365 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbcache.cpp | 4 ++-- plugins/Db3x_mmap/src/dbevents.cpp | 2 +- plugins/Db3x_mmap/src/dbsettings.cpp | 16 ++++++++-------- plugins/Db3x_mmap/src/dbtool/eventchain.cpp | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins/Db3x_mmap') diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp index d4ddb83ad3..078c7f5f70 100644 --- a/plugins/Db3x_mmap/src/dbcache.cpp +++ b/plugins/Db3x_mmap/src/dbcache.cpp @@ -81,7 +81,7 @@ void CDb3Mmap::DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes) if (x > 0) memset((m_pDbCache + ofsDest + bytes - x), 0, x); if (ofsSource < m_dwFileSize) - MoveMemory(m_pDbCache + ofsDest, m_pDbCache + ofsSource, bytes - x); + memmove(m_pDbCache + ofsDest, m_pDbCache + ofsSource, bytes - x); logg(); } @@ -108,7 +108,7 @@ void CDb3Mmap::DBWrite(DWORD ofs, PVOID pData, int bytes) //log2("write %d@%08x",bytes,ofs); if (ofs+bytes > m_dwFileSize) ReMap(ofs+bytes-m_dwFileSize); - MoveMemory(m_pDbCache+ofs,pData,bytes); + memmove(m_pDbCache+ofs,pData,bytes); logg(); } diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp index 397d1aaf3e..ad94419aec 100644 --- a/plugins/Db3x_mmap/src/dbevents.cpp +++ b/plugins/Db3x_mmap/src/dbevents.cpp @@ -298,7 +298,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::GetEvent(HANDLE hDbEvent, DBEVENTINFO *dbei) memset(dbei->pBlob + len, 0, bytesToCopy - len); mir_free(pBlob); } - else MoveMemory(dbei->pBlob, pSrc, bytesToCopy); + else memmove(dbei->pBlob, pSrc, bytesToCopy); } return 0; } diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index 1aff61284b..362aaa82e0 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -147,8 +147,8 @@ LBL_Seek: return 2; case DBVT_BYTE: dbv->bVal = pBlob[1]; break; - case DBVT_WORD: MoveMemory(&(dbv->wVal), (PWORD)(pBlob + 1), 2); break; - case DBVT_DWORD: MoveMemory(&(dbv->dVal), (PDWORD)(pBlob + 1), 4); break; + case DBVT_WORD: memmove(&(dbv->wVal), (PWORD)(pBlob + 1), 2); break; + case DBVT_DWORD: memmove(&(dbv->dVal), (PDWORD)(pBlob + 1), 4); break; case DBVT_UTF8: case DBVT_ASCIIZ: @@ -158,13 +158,13 @@ LBL_Seek: dbv->cchVal--; if (varLen < dbv->cchVal) dbv->cchVal = varLen; - MoveMemory(dbv->pszVal, pBlob + 3, dbv->cchVal); // decode + memmove(dbv->pszVal, pBlob + 3, dbv->cchVal); // decode dbv->pszVal[dbv->cchVal] = 0; dbv->cchVal = varLen; } else { dbv->pszVal = (char*)mir_alloc(1 + varLen); - MoveMemory(dbv->pszVal, pBlob + 3, varLen); + memmove(dbv->pszVal, pBlob + 3, varLen); dbv->pszVal[varLen] = 0; } break; @@ -175,11 +175,11 @@ LBL_Seek: if (isStatic) { if (varLen < dbv->cpbVal) dbv->cpbVal = varLen; - MoveMemory(dbv->pbVal, pBlob + 3, dbv->cpbVal); + memmove(dbv->pbVal, pBlob + 3, dbv->cpbVal); } else { dbv->pbVal = (BYTE *)mir_alloc(varLen); - MoveMemory(dbv->pbVal, pBlob + 3, varLen); + memmove(dbv->pbVal, pBlob + 3, varLen); } dbv->cpbVal = varLen; break; @@ -201,13 +201,13 @@ LBL_Seek: dbv->cchVal--; if (varLen < dbv->cchVal) dbv->cchVal = varLen; - MoveMemory(dbv->pszVal, decoded, dbv->cchVal); + memmove(dbv->pszVal, decoded, dbv->cchVal); dbv->pszVal[dbv->cchVal] = 0; dbv->cchVal = varLen; } else { dbv->pszVal = (char*)mir_alloc(1 + varLen); - MoveMemory(dbv->pszVal, decoded, varLen); + memmove(dbv->pszVal, decoded, varLen); dbv->pszVal[varLen] = 0; } } diff --git a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp index 15fc96b0ec..d4fd3467af 100644 --- a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp @@ -269,12 +269,12 @@ int CDb3Mmap::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime) DWORD oldSize = dbeNew->cbBlob; BYTE* pOldMemo = (BYTE*)_alloca(dbeNew->cbBlob); memcpy(pOldMemo, dbeNew->blob, dbeNew->cbBlob); - MoveMemory(dbeNew->blob, pOldMemo, dbeNew->cbBlob); // decode + memmove(dbeNew->blob, pOldMemo, dbeNew->cbBlob); // decode ConvertOldEvent(dbeNew); if (dbeNew->cbBlob > oldSize) pOldMemo = (BYTE*)_alloca(dbeNew->cbBlob); memcpy(pOldMemo, dbeNew->blob, dbeNew->cbBlob); - MoveMemory(dbeNew->blob, pOldMemo, dbeNew->cbBlob); // encode + memmove(dbeNew->blob, pOldMemo, dbeNew->cbBlob); // encode } if (dbePrev) { -- cgit v1.2.3