diff options
author | Peter Åstrand <astrand@cendio.se> | 2010-02-10 09:29:00 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2010-02-10 09:29:00 +0000 |
commit | ffeeb265c814db90d24afeed486c2935ba433d92 (patch) | |
tree | b67e8ccf19eac84c5e7650d3e8fbb0f47370e66f | |
parent | f1037f4d4c1c775d66c12f113ec6c42712e40f63 (diff) | |
download | tigervnc-ffeeb265c814db90d24afeed486c2935ba433d92.tar.gz tigervnc-ffeeb265c814db90d24afeed486c2935ba433d92.zip |
Eliminated two GCC warnings:
* The return statement in needRenderedCursor was way too complicated,
separated into intermediate variable.
* Using parenthesis in setStatus bit masks.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3971 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | common/rfb/VNCSConnectionST.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index e286cf31..c19b879d 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -321,10 +321,9 @@ void VNCSConnectionST::renderedCursorChange() bool VNCSConnectionST::needRenderedCursor() { + bool pointerpos = (!server->cursorPos.equals(pointerEventPos) && (time(0) - pointerEventTime) > 0); return (state() == RFBSTATE_NORMAL - && (!cp.supportsLocalCursor && !cp.supportsLocalXCursor - || (!server->cursorPos.equals(pointerEventPos) && - (time(0) - pointerEventTime) > 0))); + && ((!cp.supportsLocalCursor && !cp.supportsLocalXCursor) || pointerpos)); } @@ -805,7 +804,7 @@ void VNCSConnectionST::setStatus(int status) accessRights = accessRights | AccessPtrEvents | AccessKeyEvents | AccessView; break; case 1: - accessRights = accessRights & !(AccessPtrEvents | AccessKeyEvents) | AccessView; + accessRights = accessRights & (!(AccessPtrEvents | AccessKeyEvents) | AccessView); break; case 2: accessRights = accessRights & !(AccessPtrEvents | AccessKeyEvents | AccessView); |