diff options
author | Peter Åstrand <astrand@cendio.se> | 2010-02-10 07:43:02 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2010-02-10 07:43:02 +0000 |
commit | 98fe98c68939fee9bdf492e813a50f239674b733 (patch) | |
tree | 99935d1420b497c483a98ca193759b7d31fdeffd /common/rdr/types.h | |
parent | 618c1707a4d29e1d6efda633fadaaf81d1f80062 (diff) | |
download | tigervnc-98fe98c68939fee9bdf492e813a50f239674b733.tar.gz tigervnc-98fe98c68939fee9bdf492e813a50f239674b733.zip |
Eliminate GCC signed/unsigned warnings related to encodings: The
encoding in the RFB protocol has always been signed, and signed values
are also used in the specification (ie DesktopName = -307 etc). In the
code, however, unsigned types were used in a number of places, but not
all, which causes warnings. This patch fixes the problem by switching
to signed values everywhere.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3968 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rdr/types.h')
-rw-r--r-- | common/rdr/types.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/rdr/types.h b/common/rdr/types.h index 6421b137..458a13e6 100644 --- a/common/rdr/types.h +++ b/common/rdr/types.h @@ -61,6 +61,16 @@ namespace rdr { U32* buf; }; + class S32Array { + public: + S32Array() : buf(0) {} + S32Array(S32* a) : buf(a) {} // note: assumes ownership + S32Array(int len) : buf(new S32[len]) {} + ~S32Array() { delete [] buf; } + S32* takeBuf() { S32* tmp = buf; buf = 0; return tmp; } + S32* buf; + }; + } // end of namespace rdr #endif |