fixed multiple warnings on Windows. fixed bug #1368

This commit is contained in:
Vadim Pisarevsky
2011-10-03 11:00:28 +00:00
parent 78e678b1f8
commit 60ebe2003f
18 changed files with 115 additions and 93 deletions

View File

@@ -73,8 +73,12 @@
#endif
#elif defined WIN32 || defined _WIN32
#include <intrin.h>
#define CV_XADD(addr,delta) _InterlockedExchangeAdd((long volatile*)(addr), (delta))
#define WIN32_MEAN_AND_LEAN
#include <windows.h>
#undef min
#undef max
#undef abs
#define CV_XADD(addr,delta) InterlockedExchangeAdd((long volatile*)(addr), (delta))
#else
template<typename _Tp> static inline _Tp CV_XADD(_Tp* addr, _Tp delta)