From 4694d88cb56497f74b7d0f67a3f0e7b731ce659d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 20 Sep 2018 10:49:40 +0200 Subject: [PATCH] Don't force encoders to specify palette size Most encoders don't have a palette mode, so don't force them to specify a dummy value to the Encoder base class constructor. --- common/rfb/Encoder.h | 2 +- common/rfb/HextileEncoder.cxx | 2 +- common/rfb/RREEncoder.cxx | 2 +- common/rfb/RawEncoder.cxx | 2 +- common/rfb/TightJPEGEncoder.cxx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/rfb/Encoder.h b/common/rfb/Encoder.h index 66a10d26..1e57fda5 100644 --- a/common/rfb/Encoder.h +++ b/common/rfb/Encoder.h @@ -42,7 +42,7 @@ namespace rfb { class Encoder { public: Encoder(SConnection* conn, int encoding, - enum EncoderFlags flags, unsigned int maxPaletteSize); + enum EncoderFlags flags, unsigned int maxPaletteSize=-1); virtual ~Encoder(); // isSupported() should return a boolean indicating if this encoder diff --git a/common/rfb/HextileEncoder.cxx b/common/rfb/HextileEncoder.cxx index 418a4404..47e52510 100644 --- a/common/rfb/HextileEncoder.cxx +++ b/common/rfb/HextileEncoder.cxx @@ -45,7 +45,7 @@ BoolParameter improvedHextile("ImprovedHextile", #undef BPP HextileEncoder::HextileEncoder(SConnection* conn) : - Encoder(conn, encodingHextile, EncoderPlain, -1) + Encoder(conn, encodingHextile, EncoderPlain) { } diff --git a/common/rfb/RREEncoder.cxx b/common/rfb/RREEncoder.cxx index 60a06633..7287e7eb 100644 --- a/common/rfb/RREEncoder.cxx +++ b/common/rfb/RREEncoder.cxx @@ -37,7 +37,7 @@ using namespace rfb; #undef BPP RREEncoder::RREEncoder(SConnection* conn) : - Encoder(conn, encodingRRE, EncoderPlain, -1) + Encoder(conn, encodingRRE, EncoderPlain) { } diff --git a/common/rfb/RawEncoder.cxx b/common/rfb/RawEncoder.cxx index 40904271..b12cf06f 100644 --- a/common/rfb/RawEncoder.cxx +++ b/common/rfb/RawEncoder.cxx @@ -25,7 +25,7 @@ using namespace rfb; RawEncoder::RawEncoder(SConnection* conn) : - Encoder(conn, encodingRaw, EncoderPlain, -1) + Encoder(conn, encodingRaw, EncoderPlain) { } diff --git a/common/rfb/TightJPEGEncoder.cxx b/common/rfb/TightJPEGEncoder.cxx index 385207f7..5d39b62c 100644 --- a/common/rfb/TightJPEGEncoder.cxx +++ b/common/rfb/TightJPEGEncoder.cxx @@ -64,7 +64,7 @@ static const struct TightJPEGConfiguration conf[10] = { TightJPEGEncoder::TightJPEGEncoder(SConnection* conn) : - Encoder(conn, encodingTight, (EncoderFlags)(EncoderUseNativePF | EncoderLossy), -1), + Encoder(conn, encodingTight, (EncoderFlags)(EncoderUseNativePF | EncoderLossy)), qualityLevel(-1), fineQuality(-1), fineSubsampling(subsampleUndefined) { } -- 2.39.5