aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-04-03 17:26:03 +0200
committerPierre Ossman <ossman@cendio.se>2024-06-24 13:47:18 +0200
commite3132b406de025ec4ecd612977425c7e7273ecf9 (patch)
tree815ab6630f84810b0e4c9b2c65917287b4e01692 /common/rdr
parent8530a1bd034feee8bd6e3a436887af187b058f2b (diff)
downloadtigervnc-e3132b406de025ec4ecd612977425c7e7273ecf9.tar.gz
tigervnc-e3132b406de025ec4ecd612977425c7e7273ecf9.zip
Mark overridden virtual functions
Use the new "override" keyword to properly differentiate between new virtual methods, and existing virtual methods being overridden.
Diffstat (limited to 'common/rdr')
-rw-r--r--common/rdr/AESInStream.h2
-rw-r--r--common/rdr/AESOutStream.h6
-rw-r--r--common/rdr/BufferedInStream.h4
-rw-r--r--common/rdr/BufferedOutStream.h6
-rw-r--r--common/rdr/FdInStream.h2
-rw-r--r--common/rdr/FdOutStream.h4
-rw-r--r--common/rdr/FileInStream.h2
-rw-r--r--common/rdr/HexInStream.h2
-rw-r--r--common/rdr/HexOutStream.h6
-rw-r--r--common/rdr/MemInStream.h4
-rw-r--r--common/rdr/MemOutStream.h4
-rw-r--r--common/rdr/RandomStream.h2
-rw-r--r--common/rdr/TLSInStream.h2
-rw-r--r--common/rdr/TLSOutStream.h6
-rw-r--r--common/rdr/ZlibInStream.h2
-rw-r--r--common/rdr/ZlibOutStream.h6
16 files changed, 30 insertions, 30 deletions
diff --git a/common/rdr/AESInStream.h b/common/rdr/AESInStream.h
index 6069bb71..f0e6de53 100644
--- a/common/rdr/AESInStream.h
+++ b/common/rdr/AESInStream.h
@@ -33,7 +33,7 @@ namespace rdr {
virtual ~AESInStream();
private:
- virtual bool fillBuffer();
+ bool fillBuffer() override;
int keySize;
InStream* in;
diff --git a/common/rdr/AESOutStream.h b/common/rdr/AESOutStream.h
index f9e4f4da..c84ee2b8 100644
--- a/common/rdr/AESOutStream.h
+++ b/common/rdr/AESOutStream.h
@@ -31,11 +31,11 @@ namespace rdr {
AESOutStream(OutStream* out, const uint8_t* key, int keySize);
virtual ~AESOutStream();
- virtual void flush();
- virtual void cork(bool enable);
+ void flush() override;
+ void cork(bool enable) override;
private:
- virtual bool flushBuffer();
+ bool flushBuffer() override;
void writeMessage(const uint8_t* data, size_t length);
int keySize;
diff --git a/common/rdr/BufferedInStream.h b/common/rdr/BufferedInStream.h
index 89b25ffb..b3d6115e 100644
--- a/common/rdr/BufferedInStream.h
+++ b/common/rdr/BufferedInStream.h
@@ -35,7 +35,7 @@ namespace rdr {
public:
virtual ~BufferedInStream();
- virtual size_t pos();
+ size_t pos() override;
protected:
size_t availSpace() { return start + bufSize - end; }
@@ -45,7 +45,7 @@ namespace rdr {
private:
virtual bool fillBuffer() = 0;
- virtual bool overrun(size_t needed);
+ bool overrun(size_t needed) override;
private:
size_t bufSize;
diff --git a/common/rdr/BufferedOutStream.h b/common/rdr/BufferedOutStream.h
index 22693257..dd765dc9 100644
--- a/common/rdr/BufferedOutStream.h
+++ b/common/rdr/BufferedOutStream.h
@@ -35,8 +35,8 @@ namespace rdr {
public:
virtual ~BufferedOutStream();
- virtual size_t length();
- virtual void flush();
+ size_t length() override;
+ void flush() override;
// hasBufferedData() checks if there is any data yet to be flushed
@@ -49,7 +49,7 @@ namespace rdr {
virtual bool flushBuffer() = 0;
- virtual void overrun(size_t needed);
+ void overrun(size_t needed) override;
private:
size_t bufSize;
diff --git a/common/rdr/FdInStream.h b/common/rdr/FdInStream.h
index 0f8373fe..0bd5bf19 100644
--- a/common/rdr/FdInStream.h
+++ b/common/rdr/FdInStream.h
@@ -37,7 +37,7 @@ namespace rdr {
int getFd() { return fd; }
private:
- virtual bool fillBuffer();
+ bool fillBuffer() override;
size_t readFd(uint8_t* buf, size_t len);
diff --git a/common/rdr/FdOutStream.h b/common/rdr/FdOutStream.h
index 05fc1fed..d9f16efb 100644
--- a/common/rdr/FdOutStream.h
+++ b/common/rdr/FdOutStream.h
@@ -41,10 +41,10 @@ namespace rdr {
unsigned getIdleTime();
- virtual void cork(bool enable);
+ void cork(bool enable) override;
private:
- virtual bool flushBuffer();
+ bool flushBuffer() override;
size_t writeFd(const uint8_t* data, size_t length);
int fd;
struct timeval lastWrite;
diff --git a/common/rdr/FileInStream.h b/common/rdr/FileInStream.h
index e13596ce..1b409e46 100644
--- a/common/rdr/FileInStream.h
+++ b/common/rdr/FileInStream.h
@@ -34,7 +34,7 @@ namespace rdr {
~FileInStream(void);
private:
- virtual bool fillBuffer();
+ bool fillBuffer() override;
private:
FILE *file;
diff --git a/common/rdr/HexInStream.h b/common/rdr/HexInStream.h
index 76f91c08..c69fcd68 100644
--- a/common/rdr/HexInStream.h
+++ b/common/rdr/HexInStream.h
@@ -30,7 +30,7 @@ namespace rdr {
virtual ~HexInStream();
private:
- virtual bool fillBuffer();
+ bool fillBuffer() override;
private:
InStream& in_stream;
diff --git a/common/rdr/HexOutStream.h b/common/rdr/HexOutStream.h
index 16596bf3..7c74f9de 100644
--- a/common/rdr/HexOutStream.h
+++ b/common/rdr/HexOutStream.h
@@ -29,11 +29,11 @@ namespace rdr {
HexOutStream(OutStream& os);
virtual ~HexOutStream();
- virtual void flush();
- virtual void cork(bool enable);
+ void flush() override;
+ void cork(bool enable) override;
private:
- virtual bool flushBuffer();
+ bool flushBuffer() override;
void writeBuffer();
OutStream& out_stream;
diff --git a/common/rdr/MemInStream.h b/common/rdr/MemInStream.h
index 61d08482..e10273b1 100644
--- a/common/rdr/MemInStream.h
+++ b/common/rdr/MemInStream.h
@@ -54,12 +54,12 @@ namespace rdr {
delete [] start;
}
- size_t pos() { return ptr - start; }
+ size_t pos() override { return ptr - start; }
void reposition(size_t pos) { ptr = start + pos; }
private:
- bool overrun(size_t /*needed*/) { throw EndOfStream(); }
+ bool overrun(size_t /*needed*/) override { throw EndOfStream(); }
const uint8_t* start;
bool deleteWhenDone;
};
diff --git a/common/rdr/MemOutStream.h b/common/rdr/MemOutStream.h
index 5ed1ccf7..9bf2b810 100644
--- a/common/rdr/MemOutStream.h
+++ b/common/rdr/MemOutStream.h
@@ -41,7 +41,7 @@ namespace rdr {
delete [] start;
}
- size_t length() { return ptr - start; }
+ size_t length() override { return ptr - start; }
void clear() { ptr = start; };
void clearAndZero() { memset(start, 0, ptr-start); clear(); }
void reposition(size_t pos) { ptr = start + pos; }
@@ -55,7 +55,7 @@ namespace rdr {
// overrun() either doubles the buffer or adds enough space for
// needed bytes.
- virtual void overrun(size_t needed) {
+ void overrun(size_t needed) override {
size_t len = ptr - start + needed;
if (len < (size_t)(end - start) * 2)
len = (end - start) * 2;
diff --git a/common/rdr/RandomStream.h b/common/rdr/RandomStream.h
index 521012e0..48f373c1 100644
--- a/common/rdr/RandomStream.h
+++ b/common/rdr/RandomStream.h
@@ -40,7 +40,7 @@ namespace rdr {
virtual ~RandomStream();
private:
- virtual bool fillBuffer();
+ bool fillBuffer() override;
private:
static unsigned int seed;
diff --git a/common/rdr/TLSInStream.h b/common/rdr/TLSInStream.h
index 5b1b716f..ca69ddde 100644
--- a/common/rdr/TLSInStream.h
+++ b/common/rdr/TLSInStream.h
@@ -33,7 +33,7 @@ namespace rdr {
virtual ~TLSInStream();
private:
- virtual bool fillBuffer();
+ bool fillBuffer() override;
size_t readTLS(uint8_t* buf, size_t len);
static ssize_t pull(gnutls_transport_ptr_t str, void* data, size_t size);
diff --git a/common/rdr/TLSOutStream.h b/common/rdr/TLSOutStream.h
index 2d365f36..35714238 100644
--- a/common/rdr/TLSOutStream.h
+++ b/common/rdr/TLSOutStream.h
@@ -31,11 +31,11 @@ namespace rdr {
TLSOutStream(OutStream* out, gnutls_session_t session);
virtual ~TLSOutStream();
- virtual void flush();
- virtual void cork(bool enable);
+ void flush() override;
+ void cork(bool enable) override;
private:
- virtual bool flushBuffer();
+ bool flushBuffer() override;
size_t writeTLS(const uint8_t* data, size_t length);
static ssize_t push(gnutls_transport_ptr_t str, const void* data, size_t size);
diff --git a/common/rdr/ZlibInStream.h b/common/rdr/ZlibInStream.h
index cce6a6e0..a0c31161 100644
--- a/common/rdr/ZlibInStream.h
+++ b/common/rdr/ZlibInStream.h
@@ -44,7 +44,7 @@ namespace rdr {
void init();
void deinit();
- virtual bool fillBuffer();
+ bool fillBuffer() override;
private:
InStream* underlying;
diff --git a/common/rdr/ZlibOutStream.h b/common/rdr/ZlibOutStream.h
index f6c86895..14df2a84 100644
--- a/common/rdr/ZlibOutStream.h
+++ b/common/rdr/ZlibOutStream.h
@@ -40,11 +40,11 @@ namespace rdr {
void setUnderlying(OutStream* os);
void setCompressionLevel(int level=-1);
- virtual void flush();
- virtual void cork(bool enable);
+ void flush() override;
+ void cork(bool enable) override;
private:
- virtual bool flushBuffer();
+ bool flushBuffer() override;
void deflate(int flush);
void checkCompressionLevel();