Browse Source

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
tags/v1.0.90
Peter Åstrand 14 years ago
parent
commit
ffeeb265c8
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      common/rfb/VNCSConnectionST.cxx

+ 3
- 4
common/rfb/VNCSConnectionST.cxx View File

@@ -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);

Loading…
Cancel
Save