From: DRC Date: Wed, 27 Oct 2010 07:11:46 +0000 (+0000) Subject: Avoid conflict with Visual C++ abs() intrinsic X-Git-Tag: v1.0.90~148 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d58619669df0e0e9b7b63b3247d5b7591ceba9a;p=tigervnc.git Avoid conflict with Visual C++ abs() intrinsic git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4169 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/win/rfb_win32/CPointer.cxx b/win/rfb_win32/CPointer.cxx index 5a5894b6..03f8a386 100644 --- a/win/rfb_win32/CPointer.cxx +++ b/win/rfb_win32/CPointer.cxx @@ -54,7 +54,7 @@ void CPointer::pointerEvent(InputHandler* writer, const Point& pos, int buttonMa } -inline int abs(int x) {return x>0 ? x : 0;} +inline int _abs(int x) {return x>0 ? x : 0;} int emulate3Mask(int buttonMask) { // - Release left & right and press middle @@ -102,7 +102,7 @@ void CPointer::threePointerEvent(InputHandler* writer, const Point& pos, int but if (threeTimer.isActive()) { // - We are timing for an emulation event - if (abs(threePos.x - pos.x) <= 4 || abs(threePos.y - pos.y) <= 4) { + if (_abs(threePos.x - pos.x) <= 4 || _abs(threePos.y - pos.y) <= 4) { // If the mouse has moved too far since the button-change event then flush vlog.debug("emulate3: stop timer (moved)"); threeTimer.stop();