From 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sun, 30 Nov 2014 18:33:56 +0000 Subject: 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 --- plugins/SMS/src/AdditionalFunctions/ListMT.h | 10 +++++----- plugins/SMS/src/AdditionalFunctions/MemoryCompare.h | 6 +++--- plugins/SMS/src/AdditionalFunctions/MemoryFindByte.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/SMS/src/AdditionalFunctions') diff --git a/plugins/SMS/src/AdditionalFunctions/ListMT.h b/plugins/SMS/src/AdditionalFunctions/ListMT.h index 76fd432d6d..04f2552aaf 100644 --- a/plugins/SMS/src/AdditionalFunctions/ListMT.h +++ b/plugins/SMS/src/AdditionalFunctions/ListMT.h @@ -20,7 +20,7 @@ typedef CONST PLIST_MT_ITEM PCLIST_MT_ITEM, LPCLIST_MT_ITEM; // структура для работы со списком, заголовок списка typedef struct _LIST_MT { - SIZE_T nCount; // *колличество элементов в списке + size_t nCount; // *колличество элементов в списке PLIST_MT_ITEM plmtiFirst; // *указывает на первый элемент в списке PLIST_MT_ITEM plmtiLast; // *указывает на последний элемент в списке CRITICAL_SECTION cs; // *section for exclysive access to List @@ -92,15 +92,15 @@ __inline void ListMTUnLock(PCLIST_MT pclmtListMT) } -__inline SIZE_T ListMTGetCount(PCLIST_MT pclmtListMT) +__inline size_t ListMTGetCount(PCLIST_MT pclmtListMT) { - return((SIZE_T)InterlockedCompareExchangePointer((LPVOID*)&pclmtListMT->nCount,NULL,NULL)); + return((size_t)InterlockedCompareExchangePointer((LPVOID*)&pclmtListMT->nCount,NULL,NULL)); } -__inline SIZE_T ListMTItemAdd(PCLIST_MT pclmtListMT,PCLIST_MT_ITEM pclmtListMTItem,LPVOID lpData) +__inline size_t ListMTItemAdd(PCLIST_MT pclmtListMT,PCLIST_MT_ITEM pclmtListMTItem,LPVOID lpData) { - SIZE_T dwRet=(SIZE_T)InterlockedIncrementPointer(&pclmtListMT->nCount);//pclmtListMT->nCount++; + size_t dwRet=(size_t)InterlockedIncrementPointer(&pclmtListMT->nCount);//pclmtListMT->nCount++; pclmtListMTItem->lpData=lpData; pclmtListMTItem->lpListMT=pclmtListMT; 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(*((BYTE*)(((SIZE_T)lpcSource2)+dwDiffPosition)))) + if ((*((BYTE*)(((size_t)lpcSource1)+dwDiffPosition)))>(*((BYTE*)(((size_t)lpcSource2)+dwDiffPosition)))) return CSTR_GREATER_THAN; return CSTR_LESS_THAN; diff --git a/plugins/SMS/src/AdditionalFunctions/MemoryFindByte.h b/plugins/SMS/src/AdditionalFunctions/MemoryFindByte.h index a0731a0054..98fed3c44e 100644 --- a/plugins/SMS/src/AdditionalFunctions/MemoryFindByte.h +++ b/plugins/SMS/src/AdditionalFunctions/MemoryFindByte.h @@ -1,7 +1,7 @@ #if !defined(AFX_MEMORYFINDBYTE__H__INCLUDED_) #define AFX_MEMORYFINDBYTE__H__INCLUDED_ -__inline LPVOID MemoryFindByte(SIZE_T dwFrom,LPCVOID lpcSource,SIZE_T dwSourceSize,unsigned char chWhatFind) +__inline LPVOID MemoryFindByte(size_t dwFrom,LPCVOID lpcSource,size_t dwSourceSize,unsigned char chWhatFind) { if (lpcSource && dwSourceSize) if (dwFrom < dwSourceSize) -- cgit v1.2.3