]> source.dussan.org Git - tigervnc.git/commitdiff
Stop storing a copy of the encodings as we don't use it for anything
authorPierre Ossman <ossman@cendio.se>
Wed, 15 Jan 2014 12:51:53 +0000 (13:51 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 7 Jul 2014 11:27:08 +0000 (13:27 +0200)
common/rfb/ConnParams.cxx
common/rfb/ConnParams.h

index ed747523e6301b43735c284bec6ade9fddb12acf..7f39e2c68aae124775e8fb617156ea3fa0b2916c 100644 (file)
@@ -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)
index fa0fe022dab107019c9fddc01d73096b60b1d1da..47ec14a339c9ecfd80c5169f064dd7d0f6f8e68c 100644 (file)
@@ -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;