summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_sync.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-14 21:30:16 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-14 21:30:16 +0000
commitc730f12da81f636ecf65aa656a46b9337daaa37a (patch)
tree0b069d59b6366447e0a0d40982ac610fbe86d9a7 /plugins/Clist_modern/src/modern_sync.cpp
parent91867c03b57bbf85eae500475683c16da4ec3a9c (diff)
Clist_modern: changed warning lavel to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11425 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_sync.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_sync.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/Clist_modern/src/modern_sync.cpp b/plugins/Clist_modern/src/modern_sync.cpp
index 2d17b932b2..68b0927bad 100644
--- a/plugins/Clist_modern/src/modern_sync.cpp
+++ b/plugins/Clist_modern/src/modern_sync.cpp
@@ -3,11 +3,11 @@
static INT_PTR SyncCaller(WPARAM proc, LPARAM lParam)
{
- typedef int (*P0PARAMFUNC)();
- typedef int (*P1PARAMFUNC)(WPARAM);
- typedef int (*P2PARAMFUNC)(WPARAM, LPARAM);
- typedef int (*P3PARAMFUNC)(WPARAM, LPARAM, LPARAM);
- typedef int (*P4PARAMFUNC)(WPARAM, LPARAM, LPARAM, LPARAM);
+ typedef int(*P0PARAMFUNC)();
+ typedef int(*P1PARAMFUNC)(WPARAM);
+ typedef int(*P2PARAMFUNC)(WPARAM, LPARAM);
+ typedef int(*P3PARAMFUNC)(WPARAM, LPARAM, LPARAM);
+ typedef int(*P4PARAMFUNC)(WPARAM, LPARAM, LPARAM, LPARAM);
LPARAM * params = (LPARAM *)lParam;
int count = params[0];
@@ -19,13 +19,13 @@ static INT_PTR SyncCaller(WPARAM proc, LPARAM lParam)
return ((P1PARAMFUNC)proc)((WPARAM)params[1]);
case 2:
- return ((P2PARAMFUNC)proc)((WPARAM)params[1],(LPARAM)params[2]);
+ return ((P2PARAMFUNC)proc)((WPARAM)params[1], (LPARAM)params[2]);
case 3:
- return ((P3PARAMFUNC)proc)((WPARAM)params[1],(LPARAM)params[2], (LPARAM)params[3]);
+ return ((P3PARAMFUNC)proc)((WPARAM)params[1], (LPARAM)params[2], (LPARAM)params[3]);
case 4:
- return ((P4PARAMFUNC)proc)((WPARAM)params[1],(LPARAM)params[2], (LPARAM)params[3], (LPARAM)params[4]);
+ return ((P4PARAMFUNC)proc)((WPARAM)params[1], (LPARAM)params[2], (LPARAM)params[3], (LPARAM)params[4]);
}
return 0;
}
@@ -38,7 +38,7 @@ struct SYNCCALLITEM
LPARAM lParam;
int nResult;
HANDLE hDoneEvent;
- PSYNCCALLBACKPROC pfnProc;
+ PSYNCCALLBACKPROC pfnProc;
};
static void CALLBACK _SyncCallerUserAPCProc(void* param)
@@ -50,7 +50,7 @@ static void CALLBACK _SyncCallerUserAPCProc(void* param)
static int SyncCallAPCProxy(PSYNCCALLBACKPROC pfnProc, WPARAM wParam, LPARAM lParam)
{
- if (pfnProc == NULL)
+ if (pfnProc == NULL)
return 0;
if (GetCurrentThreadId() == g_dwMainThreadID)
@@ -63,8 +63,8 @@ static int SyncCallAPCProxy(PSYNCCALLBACKPROC pfnProc, WPARAM wParam, LPARAM lPa
item.nResult = 0;
item.hDoneEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- CallFunctionAsync(_SyncCallerUserAPCProc, &item);
-
+ CallFunctionAsync(_SyncCallerUserAPCProc, &item);
+
WaitForSingleObject(item.hDoneEvent, INFINITE);
CloseHandle(item.hDoneEvent);
return item.nResult;
@@ -72,21 +72,21 @@ static int SyncCallAPCProxy(PSYNCCALLBACKPROC pfnProc, WPARAM wParam, LPARAM lPa
/////////////////////////////////////////////////////////////////////////////////////////
-int DoCall( PSYNCCALLBACKPROC pfnProc, WPARAM wParam, LPARAM lParam)
+int DoCall(PSYNCCALLBACKPROC pfnProc, WPARAM, LPARAM lParam)
{
return SyncCallAPCProxy(pfnProc, 0, lParam);
}
-int SyncCall(void * vproc, int count, ... )
+int SyncCall(void * vproc, int count, ...)
{
LPARAM params[5];
va_list va;
int i;
params[0] = (LPARAM)count;
va_start(va, count);
- for (i=0; i < count && i < SIZEOF(params)-1; i++)
- params[i+1] = va_arg(va,LPARAM);
+ for (i = 0; i < count && i < SIZEOF(params) - 1; i++)
+ params[i + 1] = va_arg(va, LPARAM);
va_end(va);
- return SyncCallAPCProxy(SyncCaller, (WPARAM)vproc, (LPARAM) params);
+ return SyncCallAPCProxy(SyncCaller, (WPARAM)vproc, (LPARAM)params);
}