diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
commit | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (patch) | |
tree | ded36ec10c55fb5d33c8d2e471ec808eeb058a04 /plugins/SMS/src/AdditionalFunctions/MemoryCompare.h | |
parent | 237d02ebbabbedfb8b33160ebfb5250bbd491eca (diff) |
Fix buf size for Get/Set text, open/save file name
SMS: SIZE_T -> size_t
MRA: small code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@11175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SMS/src/AdditionalFunctions/MemoryCompare.h')
-rw-r--r-- | plugins/SMS/src/AdditionalFunctions/MemoryCompare.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/SMS/src/AdditionalFunctions/MemoryCompare.h b/plugins/SMS/src/AdditionalFunctions/MemoryCompare.h index a357dd1d67..c9d58a3b6f 100644 --- a/plugins/SMS/src/AdditionalFunctions/MemoryCompare.h +++ b/plugins/SMS/src/AdditionalFunctions/MemoryCompare.h @@ -1,7 +1,7 @@ #if !defined(AFX_MEMORYCOMPARE__H__INCLUDED_)
#define AFX_MEMORYCOMPARE__H__INCLUDED_
-__inline DWORD MemoryCompare(LPCVOID lpcSource1,SIZE_T dwSource1Size,LPCVOID lpcSource2,SIZE_T dwSource2Size)
+__inline DWORD MemoryCompare(LPCVOID lpcSource1,size_t dwSource1Size,LPCVOID lpcSource2,size_t dwSource2Size)
{
if (dwSource1Size == dwSource2Size) {
if (lpcSource1 == lpcSource2)
@@ -11,14 +11,14 @@ __inline DWORD MemoryCompare(LPCVOID lpcSource1,SIZE_T dwSource1Size,LPCVOID lpc #ifdef _INC_MEMORY
return 2 + memcmp(lpcSource1,lpcSource2,dwSource1Size));
#else
- SIZE_T dwDiffPosition;
+ size_t dwDiffPosition;
//dwDiffPosition=RtlCompareMemory(lpcSource1,lpcSource2,dwSource1Size);
for(dwDiffPosition=0; (dwDiffPosition<dwSource1Size) && (((const BYTE*)lpcSource1)[dwDiffPosition]==((const BYTE*)lpcSource2)[dwDiffPosition]); dwDiffPosition++);
if (dwDiffPosition==dwSource1Size)
return CSTR_EQUAL;
- if ((*((BYTE*)(((SIZE_T)lpcSource1)+dwDiffPosition)))>(*((BYTE*)(((SIZE_T)lpcSource2)+dwDiffPosition))))
+ if ((*((BYTE*)(((size_t)lpcSource1)+dwDiffPosition)))>(*((BYTE*)(((size_t)lpcSource2)+dwDiffPosition))))
return CSTR_GREATER_THAN;
return CSTR_LESS_THAN;
|