aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2020-05-19 19:49:41 +0200
committerPierre Ossman <ossman@cendio.se>2020-05-21 11:34:22 +0200
commitcf40b83e2330607bab221c33b8f7b5b1885eedb3 (patch)
treef2b8c66736f1f808def3272cce0a30ff843a36e1 /common/rdr
parent0cd533cf7f53daa157a9b7f6af2b9b72eeca5403 (diff)
downloadtigervnc-cf40b83e2330607bab221c33b8f7b5b1885eedb3.tar.gz
tigervnc-cf40b83e2330607bab221c33b8f7b5b1885eedb3.zip
Remove unused bufSize argument from streams
Diffstat (limited to 'common/rdr')
-rw-r--r--common/rdr/BufferedInStream.cxx4
-rw-r--r--common/rdr/BufferedInStream.h2
-rw-r--r--common/rdr/BufferedOutStream.cxx4
-rw-r--r--common/rdr/BufferedOutStream.h2
-rw-r--r--common/rdr/FdInStream.cxx11
-rw-r--r--common/rdr/FdInStream.h6
-rw-r--r--common/rdr/FdOutStream.cxx5
-rw-r--r--common/rdr/FdOutStream.h2
-rw-r--r--common/rdr/HexInStream.cxx4
-rw-r--r--common/rdr/HexInStream.h2
-rw-r--r--common/rdr/HexOutStream.cxx4
-rw-r--r--common/rdr/HexOutStream.h2
-rw-r--r--common/rdr/ZlibInStream.cxx5
-rw-r--r--common/rdr/ZlibInStream.h2
-rw-r--r--common/rdr/ZlibOutStream.cxx4
-rw-r--r--common/rdr/ZlibOutStream.h2
16 files changed, 27 insertions, 34 deletions
diff --git a/common/rdr/BufferedInStream.cxx b/common/rdr/BufferedInStream.cxx
index 5db3953a..64cdb667 100644
--- a/common/rdr/BufferedInStream.cxx
+++ b/common/rdr/BufferedInStream.cxx
@@ -28,8 +28,8 @@ using namespace rdr;
static const size_t DEFAULT_BUF_SIZE = 8192;
-BufferedInStream::BufferedInStream(size_t bufSize_)
- : bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0)
+BufferedInStream::BufferedInStream()
+ : bufSize(DEFAULT_BUF_SIZE), offset(0)
{
ptr = end = start = new U8[bufSize];
}
diff --git a/common/rdr/BufferedInStream.h b/common/rdr/BufferedInStream.h
index 61e57d65..acf2b927 100644
--- a/common/rdr/BufferedInStream.h
+++ b/common/rdr/BufferedInStream.h
@@ -46,7 +46,7 @@ namespace rdr {
U8* start;
protected:
- BufferedInStream(size_t bufSize=0);
+ BufferedInStream();
};
} // end of namespace rdr
diff --git a/common/rdr/BufferedOutStream.cxx b/common/rdr/BufferedOutStream.cxx
index 69e877ad..ac76f6a7 100644
--- a/common/rdr/BufferedOutStream.cxx
+++ b/common/rdr/BufferedOutStream.cxx
@@ -30,8 +30,8 @@ using namespace rdr;
static const size_t DEFAULT_BUF_SIZE = 16384;
-BufferedOutStream::BufferedOutStream(size_t bufSize_)
- : bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0)
+BufferedOutStream::BufferedOutStream()
+ : bufSize(DEFAULT_BUF_SIZE), offset(0)
{
ptr = start = sentUpTo = new U8[bufSize];
end = start + bufSize;
diff --git a/common/rdr/BufferedOutStream.h b/common/rdr/BufferedOutStream.h
index c33621b6..8e3229d5 100644
--- a/common/rdr/BufferedOutStream.h
+++ b/common/rdr/BufferedOutStream.h
@@ -57,7 +57,7 @@ namespace rdr {
U8* sentUpTo;
protected:
- BufferedOutStream(size_t bufSize=0);
+ BufferedOutStream();
};
}
diff --git a/common/rdr/FdInStream.cxx b/common/rdr/FdInStream.cxx
index c9d2241c..d2753388 100644
--- a/common/rdr/FdInStream.cxx
+++ b/common/rdr/FdInStream.cxx
@@ -48,19 +48,16 @@ using namespace rdr;
enum { DEFAULT_BUF_SIZE = 8192 };
-FdInStream::FdInStream(int fd_, int timeoutms_, size_t bufSize_,
+FdInStream::FdInStream(int fd_, int timeoutms_,
bool closeWhenDone_)
- : BufferedInStream(bufSize_),
- fd(fd_), closeWhenDone(closeWhenDone_),
+ : fd(fd_), closeWhenDone(closeWhenDone_),
timeoutms(timeoutms_), blockCallback(0),
timing(false), timeWaitedIn100us(5), timedKbits(0)
{
}
-FdInStream::FdInStream(int fd_, FdInStreamBlockCallback* blockCallback_,
- size_t bufSize_)
- : BufferedInStream(bufSize_),
- fd(fd_), timeoutms(0), blockCallback(blockCallback_),
+FdInStream::FdInStream(int fd_, FdInStreamBlockCallback* blockCallback_)
+ : fd(fd_), timeoutms(0), blockCallback(blockCallback_),
timing(false), timeWaitedIn100us(5), timedKbits(0)
{
}
diff --git a/common/rdr/FdInStream.h b/common/rdr/FdInStream.h
index f7a52baf..82280f9f 100644
--- a/common/rdr/FdInStream.h
+++ b/common/rdr/FdInStream.h
@@ -37,10 +37,8 @@ namespace rdr {
public:
- FdInStream(int fd, int timeoutms=-1, size_t bufSize=0,
- bool closeWhenDone_=false);
- FdInStream(int fd, FdInStreamBlockCallback* blockCallback,
- size_t bufSize=0);
+ FdInStream(int fd, int timeoutms=-1, bool closeWhenDone_=false);
+ FdInStream(int fd, FdInStreamBlockCallback* blockCallback);
virtual ~FdInStream();
void setTimeout(int timeoutms);
diff --git a/common/rdr/FdOutStream.cxx b/common/rdr/FdOutStream.cxx
index 4fc74671..d7da7103 100644
--- a/common/rdr/FdOutStream.cxx
+++ b/common/rdr/FdOutStream.cxx
@@ -49,9 +49,8 @@
using namespace rdr;
-FdOutStream::FdOutStream(int fd_, bool blocking_, int timeoutms_, size_t bufSize_)
- : BufferedOutStream(bufSize_),
- fd(fd_), blocking(blocking_), timeoutms(timeoutms_)
+FdOutStream::FdOutStream(int fd_, bool blocking_, int timeoutms_)
+ : fd(fd_), blocking(blocking_), timeoutms(timeoutms_)
{
gettimeofday(&lastWrite, NULL);
}
diff --git a/common/rdr/FdOutStream.h b/common/rdr/FdOutStream.h
index b1ecbd56..24327972 100644
--- a/common/rdr/FdOutStream.h
+++ b/common/rdr/FdOutStream.h
@@ -34,7 +34,7 @@ namespace rdr {
public:
- FdOutStream(int fd, bool blocking=true, int timeoutms=-1, size_t bufSize=0);
+ FdOutStream(int fd, bool blocking=true, int timeoutms=-1);
virtual ~FdOutStream();
void setTimeout(int timeoutms);
diff --git a/common/rdr/HexInStream.cxx b/common/rdr/HexInStream.cxx
index ab98298f..3800961d 100644
--- a/common/rdr/HexInStream.cxx
+++ b/common/rdr/HexInStream.cxx
@@ -26,8 +26,8 @@ using namespace rdr;
static inline int min(int a, int b) {return a<b ? a : b;}
-HexInStream::HexInStream(InStream& is, size_t bufSize_)
-: BufferedInStream(bufSize_), in_stream(is)
+HexInStream::HexInStream(InStream& is)
+: in_stream(is)
{
}
diff --git a/common/rdr/HexInStream.h b/common/rdr/HexInStream.h
index 87c050a9..5142a655 100644
--- a/common/rdr/HexInStream.h
+++ b/common/rdr/HexInStream.h
@@ -26,7 +26,7 @@ namespace rdr {
class HexInStream : public BufferedInStream {
public:
- HexInStream(InStream& is, size_t bufSize=0);
+ HexInStream(InStream& is);
virtual ~HexInStream();
static bool readHexAndShift(char c, int* v);
diff --git a/common/rdr/HexOutStream.cxx b/common/rdr/HexOutStream.cxx
index a44c3998..19c66851 100644
--- a/common/rdr/HexOutStream.cxx
+++ b/common/rdr/HexOutStream.cxx
@@ -25,8 +25,8 @@ const int DEFAULT_BUF_LEN = 16384;
static inline size_t min(size_t a, size_t b) {return a<b ? a : b;}
-HexOutStream::HexOutStream(OutStream& os, size_t buflen)
-: out_stream(os), offset(0), bufSize(buflen ? buflen : DEFAULT_BUF_LEN)
+HexOutStream::HexOutStream(OutStream& os)
+ : out_stream(os), offset(0), bufSize(DEFAULT_BUF_LEN)
{
if (bufSize % 2)
bufSize--;
diff --git a/common/rdr/HexOutStream.h b/common/rdr/HexOutStream.h
index 29827689..02366478 100644
--- a/common/rdr/HexOutStream.h
+++ b/common/rdr/HexOutStream.h
@@ -26,7 +26,7 @@ namespace rdr {
class HexOutStream : public OutStream {
public:
- HexOutStream(OutStream& os, size_t buflen=0);
+ HexOutStream(OutStream& os);
virtual ~HexOutStream();
void flush();
diff --git a/common/rdr/ZlibInStream.cxx b/common/rdr/ZlibInStream.cxx
index 2e4e080b..b9e772d5 100644
--- a/common/rdr/ZlibInStream.cxx
+++ b/common/rdr/ZlibInStream.cxx
@@ -24,9 +24,8 @@
using namespace rdr;
-ZlibInStream::ZlibInStream(size_t bufSize_)
- : BufferedInStream(bufSize_),
- underlying(0), zs(NULL), bytesIn(0)
+ZlibInStream::ZlibInStream()
+ : underlying(0), zs(NULL), bytesIn(0)
{
init();
}
diff --git a/common/rdr/ZlibInStream.h b/common/rdr/ZlibInStream.h
index 04416756..1597b54a 100644
--- a/common/rdr/ZlibInStream.h
+++ b/common/rdr/ZlibInStream.h
@@ -33,7 +33,7 @@ namespace rdr {
class ZlibInStream : public BufferedInStream {
public:
- ZlibInStream(size_t bufSize=0);
+ ZlibInStream();
virtual ~ZlibInStream();
void setUnderlying(InStream* is, size_t bytesIn);
diff --git a/common/rdr/ZlibOutStream.cxx b/common/rdr/ZlibOutStream.cxx
index 78abfc49..8f7170da 100644
--- a/common/rdr/ZlibOutStream.cxx
+++ b/common/rdr/ZlibOutStream.cxx
@@ -33,9 +33,9 @@ using namespace rdr;
enum { DEFAULT_BUF_SIZE = 16384 };
-ZlibOutStream::ZlibOutStream(OutStream* os, size_t bufSize_, int compressLevel)
+ZlibOutStream::ZlibOutStream(OutStream* os, int compressLevel)
: underlying(os), compressionLevel(compressLevel), newLevel(compressLevel),
- bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0)
+ bufSize(DEFAULT_BUF_SIZE), offset(0)
{
zs = new z_stream;
zs->zalloc = Z_NULL;
diff --git a/common/rdr/ZlibOutStream.h b/common/rdr/ZlibOutStream.h
index aa1875c3..2b08f8d5 100644
--- a/common/rdr/ZlibOutStream.h
+++ b/common/rdr/ZlibOutStream.h
@@ -35,7 +35,7 @@ namespace rdr {
public:
- ZlibOutStream(OutStream* os=0, size_t bufSize=0, int compressionLevel=-1);
+ ZlibOutStream(OutStream* os=0, int compressionLevel=-1);
virtual ~ZlibOutStream();
void setUnderlying(OutStream* os);