From: Pierre Ossman Date: Wed, 15 Jan 2014 12:51:53 +0000 (+0100) Subject: Stop storing a copy of the encodings as we don't use it for anything X-Git-Tag: v1.3.90~48^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=941d29081b3a545b1b5124504bf9ec48964ad878;p=tigervnc.git Stop storing a copy of the encodings as we don't use it for anything --- diff --git a/common/rfb/ConnParams.cxx b/common/rfb/ConnParams.cxx index ed747523..7f39e2c6 100644 --- a/common/rfb/ConnParams.cxx +++ b/common/rfb/ConnParams.cxx @@ -37,8 +37,7 @@ ConnParams::ConnParams() supportsContinuousUpdates(false), customCompressLevel(false), compressLevel(2), noJpeg(false), qualityLevel(-1), fineQualityLevel(-1), - subsampling(SUBSAMP_UNDEFINED), - name_(0), nEncodings_(0), encodings_(0), + subsampling(SUBSAMP_UNDEFINED), name_(0), currentEncoding_(encodingRaw), verStrPos(0) { setName(""); @@ -47,7 +46,6 @@ ConnParams::ConnParams() ConnParams::~ConnParams() { delete [] name_; - delete [] encodings_; } bool ConnParams::readVersion(rdr::InStream* is, bool* done) @@ -90,11 +88,6 @@ void ConnParams::setName(const char* name) void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings) { - if (nEncodings > nEncodings_) { - delete [] encodings_; - encodings_ = new rdr::S32[nEncodings]; - } - nEncodings_ = nEncodings; useCopyRect = false; supportsLocalCursor = false; supportsDesktopResize = false; @@ -110,8 +103,6 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings) currentEncoding_ = encodingRaw; for (int i = nEncodings-1; i >= 0; i--) { - encodings_[i] = encodings[i]; - if (encodings[i] == encodingCopyRect) useCopyRect = true; else if (encodings[i] == pseudoEncodingCursor) diff --git a/common/rfb/ConnParams.h b/common/rfb/ConnParams.h index fa0fe022..47ec14a3 100644 --- a/common/rfb/ConnParams.h +++ b/common/rfb/ConnParams.h @@ -67,9 +67,9 @@ namespace rfb { void setName(const char* name); rdr::S32 currentEncoding() { return currentEncoding_; } - int nEncodings() { return nEncodings_; } - const rdr::S32* encodings() { return encodings_; } + void setEncodings(int nEncodings, const rdr::S32* encodings); + bool useCopyRect; bool supportsLocalCursor; @@ -94,8 +94,6 @@ namespace rfb { PixelFormat pf_; char* name_; - int nEncodings_; - rdr::S32* encodings_; int currentEncoding_; char verStr[13]; int verStrPos;