Fix missing return type for unsafe CV_XADD function

pull/19980/head
Zhuo Zhang 4 years ago
parent 1b64851fa8
commit bf26050f7e
No known key found for this signature in database
GPG Key ID: 961A0300B14A36D
  1. 2
      modules/core/include/opencv2/core/cvdef.h

@ -554,7 +554,7 @@ Cv64suf;
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd((long volatile*)addr, delta)
#else
#ifdef OPENCV_FORCE_UNSAFE_XADD
CV_INLINE CV_XADD(int* addr, int delta) { int tmp = *addr; *addr += delta; return tmp; }
CV_INLINE int CV_XADD(int* addr, int delta) { int tmp = *addr; *addr += delta; return tmp; }
#else
#error "OpenCV: can't define safe CV_XADD macro for current platform (unsupported). Define CV_XADD macro through custom port header (see OPENCV_INCLUDE_PORT_FILE)"
#endif

Loading…
Cancel
Save