From 28c1d54937185bd983ccede4a587aa5dc9b2e5df Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 3 Mar 2015 16:27:44 +0100 Subject: [PATCH] Switch to unsigned parameters for ExtendedDesktopSize handler The constants used here are unsigned so it makes more sense that the parameters are as well. --- common/rfb/CMsgHandler.cxx | 4 ++-- common/rfb/CMsgHandler.h | 2 +- vncviewer/CConn.cxx | 4 ++-- vncviewer/CConn.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/rfb/CMsgHandler.cxx b/common/rfb/CMsgHandler.cxx index ce8b271f..11c979a3 100644 --- a/common/rfb/CMsgHandler.cxx +++ b/common/rfb/CMsgHandler.cxx @@ -38,13 +38,13 @@ void CMsgHandler::setDesktopSize(int width, int height) cp.height = height; } -void CMsgHandler::setExtendedDesktopSize(int reason, int result, +void CMsgHandler::setExtendedDesktopSize(unsigned reason, unsigned result, int width, int height, const ScreenSet& layout) { cp.supportsSetDesktopSize = true; - if ((reason == (signed)reasonClient) && (result != (signed)resultSuccess)) + if ((reason == reasonClient) && (result != resultSuccess)) return; if (!layout.validate(width, height)) diff --git a/common/rfb/CMsgHandler.h b/common/rfb/CMsgHandler.h index 5e333d27..7d2cdc20 100644 --- a/common/rfb/CMsgHandler.h +++ b/common/rfb/CMsgHandler.h @@ -46,7 +46,7 @@ namespace rfb { // methods to set the members of cp appropriately. virtual void setDesktopSize(int w, int h); - virtual void setExtendedDesktopSize(int reason, int result, + virtual void setExtendedDesktopSize(unsigned reason, unsigned result, int w, int h, const ScreenSet& layout); virtual void setCursor(int width, int height, const Point& hotspot, diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index 5935c177..ab5c9ccc 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -313,8 +313,8 @@ void CConn::setDesktopSize(int w, int h) } // setExtendedDesktopSize() is a more advanced version of setDesktopSize() -void CConn::setExtendedDesktopSize(int reason, int result, int w, int h, - const rfb::ScreenSet& layout) +void CConn::setExtendedDesktopSize(unsigned reason, unsigned result, + int w, int h, const rfb::ScreenSet& layout) { CConnection::setExtendedDesktopSize(reason, result, w, h, layout); diff --git a/vncviewer/CConn.h b/vncviewer/CConn.h index 709ca2f8..1b929373 100644 --- a/vncviewer/CConn.h +++ b/vncviewer/CConn.h @@ -51,8 +51,8 @@ public: void serverInit(); void setDesktopSize(int w, int h); - void setExtendedDesktopSize(int reason, int result, int w, int h, - const rfb::ScreenSet& layout); + void setExtendedDesktopSize(unsigned reason, unsigned result, + int w, int h, const rfb::ScreenSet& layout); void setName(const char* name); -- 2.39.5