aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--common/network/TcpSocket.h10
-rw-r--r--common/network/UnixSocket.h8
-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
-rw-r--r--common/rfb/CConnection.h44
-rw-r--r--common/rfb/CSecurityDH.h6
-rw-r--r--common/rfb/CSecurityMSLogonII.h6
-rw-r--r--common/rfb/CSecurityNone.h4
-rw-r--r--common/rfb/CSecurityPlain.h4
-rw-r--r--common/rfb/CSecurityRSAAES.h6
-rw-r--r--common/rfb/CSecurityStack.h6
-rw-r--r--common/rfb/CSecurityTLS.h6
-rw-r--r--common/rfb/CSecurityVeNCrypt.h6
-rw-r--r--common/rfb/CSecurityVncAuth.h4
-rw-r--r--common/rfb/Configuration.h44
-rw-r--r--common/rfb/CopyRectDecoder.h17
-rw-r--r--common/rfb/Cursor.h2
-rw-r--r--common/rfb/DecodeManager.h2
-rw-r--r--common/rfb/EncodeManager.h4
-rw-r--r--common/rfb/H264Decoder.h11
-rw-r--r--common/rfb/H264LibavDecoderContext.h8
-rw-r--r--common/rfb/H264WinDecoderContext.h8
-rw-r--r--common/rfb/HextileDecoder.h11
-rw-r--r--common/rfb/HextileEncoder.h10
-rw-r--r--common/rfb/KeyRemapper.cxx2
-rw-r--r--common/rfb/LogWriter.h2
-rw-r--r--common/rfb/Logger_file.h2
-rw-r--r--common/rfb/Logger_syslog.h2
-rw-r--r--common/rfb/PixelBuffer.h10
-rw-r--r--common/rfb/RREDecoder.h11
-rw-r--r--common/rfb/RREEncoder.h10
-rw-r--r--common/rfb/RawDecoder.h11
-rw-r--r--common/rfb/RawEncoder.h10
-rw-r--r--common/rfb/SConnection.h29
-rw-r--r--common/rfb/SDesktop.h6
-rw-r--r--common/rfb/SSecurityNone.h6
-rw-r--r--common/rfb/SSecurityPlain.h6
-rw-r--r--common/rfb/SSecurityRSAAES.h8
-rw-r--r--common/rfb/SSecurityStack.h8
-rw-r--r--common/rfb/SSecurityTLS.h6
-rw-r--r--common/rfb/SSecurityVeNCrypt.h8
-rw-r--r--common/rfb/SSecurityVncAuth.h10
-rw-r--r--common/rfb/TightDecoder.h23
-rw-r--r--common/rfb/TightEncoder.h12
-rw-r--r--common/rfb/TightJPEGEncoder.h16
-rw-r--r--common/rfb/Timer.h2
-rw-r--r--common/rfb/UnixPasswordValidator.h2
-rw-r--r--common/rfb/UpdateTracker.h8
-rw-r--r--common/rfb/VNCSConnectionST.h50
-rw-r--r--common/rfb/VNCServerST.h70
-rw-r--r--common/rfb/WinPasswdValidator.h2
-rw-r--r--common/rfb/ZRLEDecoder.h11
-rw-r--r--common/rfb/ZRLEEncoder.h12
-rw-r--r--tests/perf/decperf.cxx24
-rw-r--r--tests/perf/encperf.cxx32
-rw-r--r--tests/perf/fbperf.cxx12
-rw-r--r--tests/unit/emulatemb.cxx2
-rw-r--r--tests/unit/gesturehandler.cxx2
-rw-r--r--unix/tx/TXButton.h2
-rw-r--r--unix/tx/TXCheckbox.h2
-rw-r--r--unix/tx/TXDialog.h2
-rw-r--r--unix/tx/TXLabel.h2
-rw-r--r--unix/vncconfig/QueryConnectDialog.h8
-rw-r--r--unix/vncconfig/vncconfig.cxx10
-rw-r--r--unix/x0vncserver/Image.h10
-rw-r--r--unix/x0vncserver/XDesktop.h28
-rw-r--r--unix/x0vncserver/XPixelBuffer.h2
-rw-r--r--unix/x0vncserver/x0vncserver.cxx2
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.h28
-rw-r--r--vncviewer/CConn.h37
-rw-r--r--vncviewer/DesktopWindow.h8
-rw-r--r--vncviewer/EmulateMB.h2
-rw-r--r--vncviewer/GestureHandler.h2
-rw-r--r--vncviewer/MonitorIndicesParameter.h2
-rw-r--r--vncviewer/OptionsDialog.h2
-rw-r--r--vncviewer/PlatformPixelBuffer.h2
-rw-r--r--vncviewer/UserDialog.h4
-rw-r--r--vncviewer/Viewport.h8
-rw-r--r--vncviewer/Win32TouchHandler.h10
-rw-r--r--vncviewer/XInputTouchHandler.h12
-rw-r--r--vncviewer/fltk/Fl_Monitor_Arrangement.h2
-rw-r--r--vncviewer/fltk/Fl_Navigation.h2
-rw-r--r--win/rfb_win32/AboutDialog.h2
-rw-r--r--win/rfb_win32/Clipboard.h2
-rw-r--r--win/rfb_win32/DeviceFrameBuffer.h2
-rw-r--r--win/rfb_win32/Dialog.h2
-rw-r--r--win/rfb_win32/RegConfig.h4
-rw-r--r--win/rfb_win32/SDisplay.h28
-rw-r--r--win/rfb_win32/SDisplayCorePolling.h8
-rw-r--r--win/rfb_win32/SDisplayCoreWMHooks.h6
-rw-r--r--win/rfb_win32/SecurityPage.h6
-rw-r--r--win/rfb_win32/Service.cxx2
-rw-r--r--win/rfb_win32/SocketManager.h4
-rw-r--r--win/rfb_win32/WMHooks.cxx2
-rw-r--r--win/rfb_win32/WMNotifier.h2
-rw-r--r--win/vncconfig/Authentication.h14
-rw-r--r--win/vncconfig/Connections.h10
-rw-r--r--win/vncconfig/Desktop.h6
-rw-r--r--win/vncconfig/Hooking.h6
-rw-r--r--win/vncconfig/Inputs.h6
-rw-r--r--win/vncconfig/Legacy.h6
-rw-r--r--win/vncconfig/PasswordDialog.h2
-rw-r--r--win/vncconfig/Sharing.h6
-rw-r--r--win/winvnc/AddNewClientDialog.h4
-rw-r--r--win/winvnc/ControlPanel.h4
-rw-r--r--win/winvnc/QueryConnectDialog.h6
-rw-r--r--win/winvnc/STrayIcon.cxx2
-rw-r--r--win/winvnc/STrayIcon.h2
-rw-r--r--win/winvnc/VNCServerService.h4
-rw-r--r--win/winvnc/VNCServerWin32.h10
124 files changed, 534 insertions, 527 deletions
diff --git a/common/network/TcpSocket.h b/common/network/TcpSocket.h
index c62dd78b..b029bff2 100644
--- a/common/network/TcpSocket.h
+++ b/common/network/TcpSocket.h
@@ -56,8 +56,8 @@ namespace network {
TcpSocket(int sock);
TcpSocket(const char *name, int port);
- virtual const char* getPeerAddress();
- virtual const char* getPeerEndpoint();
+ const char* getPeerAddress() override;
+ const char* getPeerEndpoint() override;
protected:
bool enableNagles(bool enable);
@@ -68,12 +68,12 @@ namespace network {
TcpListener(const struct sockaddr *listenaddr, socklen_t listenaddrlen);
TcpListener(int sock);
- virtual int getMyPort();
+ int getMyPort() override;
static std::list<std::string> getMyAddresses();
protected:
- virtual Socket* createSocket(int fd);
+ Socket* createSocket(int fd) override;
};
void createLocalTcpListeners(std::list<SocketListener*> *listeners,
@@ -97,7 +97,7 @@ namespace network {
TcpFilter(const char* filter);
virtual ~TcpFilter();
- virtual bool verifyConnection(Socket* s);
+ bool verifyConnection(Socket* s) override;
typedef enum {Accept, Reject, Query} Action;
struct Pattern {
diff --git a/common/network/UnixSocket.h b/common/network/UnixSocket.h
index e66afcd1..3ecc6179 100644
--- a/common/network/UnixSocket.h
+++ b/common/network/UnixSocket.h
@@ -38,8 +38,8 @@ namespace network {
UnixSocket(int sock);
UnixSocket(const char *name);
- virtual const char* getPeerAddress();
- virtual const char* getPeerEndpoint();
+ const char* getPeerAddress() override;
+ const char* getPeerEndpoint() override;
};
class UnixListener : public SocketListener {
@@ -47,10 +47,10 @@ namespace network {
UnixListener(const char *listenaddr, int mode);
virtual ~UnixListener();
- int getMyPort();
+ int getMyPort() override;
protected:
- virtual Socket* createSocket(int fd);
+ Socket* createSocket(int fd) override;
};
}
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();
diff --git a/common/rfb/CConnection.h b/common/rfb/CConnection.h
index df0fbb14..dca98a92 100644
--- a/common/rfb/CConnection.h
+++ b/common/rfb/CConnection.h
@@ -97,34 +97,32 @@ namespace rfb {
// Note: These must be called by any deriving classes
- virtual void setDesktopSize(int w, int h);
- virtual void setExtendedDesktopSize(unsigned reason, unsigned result,
- int w, int h,
- const ScreenSet& layout);
+ void setDesktopSize(int w, int h) override;
+ void setExtendedDesktopSize(unsigned reason, unsigned result,
+ int w, int h,
+ const ScreenSet& layout) override;
- virtual void endOfContinuousUpdates();
+ void endOfContinuousUpdates() override;
- virtual void serverInit(int width, int height,
- const PixelFormat& pf,
- const char* name);
+ void serverInit(int width, int height, const PixelFormat& pf,
+ const char* name) override;
- virtual bool readAndDecodeRect(const Rect& r, int encoding,
- ModifiablePixelBuffer* pb);
+ bool readAndDecodeRect(const Rect& r, int encoding,
+ ModifiablePixelBuffer* pb) override;
- virtual void framebufferUpdateStart();
- virtual void framebufferUpdateEnd();
- virtual bool dataRect(const Rect& r, int encoding);
+ void framebufferUpdateStart() override;
+ void framebufferUpdateEnd() override;
+ bool dataRect(const Rect& r, int encoding) override;
- virtual void serverCutText(const char* str);
+ void serverCutText(const char* str) override;
- virtual void handleClipboardCaps(uint32_t flags,
- const uint32_t* lengths);
- virtual void handleClipboardRequest(uint32_t flags);
- virtual void handleClipboardPeek();
- virtual void handleClipboardNotify(uint32_t flags);
- virtual void handleClipboardProvide(uint32_t flags,
- const size_t* lengths,
- const uint8_t* const* data);
+ void handleClipboardCaps(uint32_t flags,
+ const uint32_t* lengths) override;
+ void handleClipboardRequest(uint32_t flags) override;
+ void handleClipboardPeek() override;
+ void handleClipboardNotify(uint32_t flags) override;
+ void handleClipboardProvide(uint32_t flags, const size_t* lengths,
+ const uint8_t* const* data) override;
// Methods to be overridden in a derived class
@@ -249,7 +247,7 @@ namespace rfb {
// responds to requests, stating no support for synchronisation.
// When overriding, call CMsgHandler::fence() directly in order to
// state correct support for fence flags.
- virtual void fence(uint32_t flags, unsigned len, const uint8_t data[]);
+ void fence(uint32_t flags, unsigned len, const uint8_t data[]) override;
private:
bool processVersionMsg();
diff --git a/common/rfb/CSecurityDH.h b/common/rfb/CSecurityDH.h
index d0e5e894..df33d29b 100644
--- a/common/rfb/CSecurityDH.h
+++ b/common/rfb/CSecurityDH.h
@@ -33,9 +33,9 @@ namespace rfb {
public:
CSecurityDH(CConnection* cc);
virtual ~CSecurityDH();
- virtual bool processMsg();
- virtual int getType() const { return secTypeDH; }
- virtual bool isSecure() const { return false; }
+ bool processMsg() override;
+ int getType() const override { return secTypeDH; }
+ bool isSecure() const override { return false; }
private:
bool readKey();
diff --git a/common/rfb/CSecurityMSLogonII.h b/common/rfb/CSecurityMSLogonII.h
index f7c83a3e..71600c85 100644
--- a/common/rfb/CSecurityMSLogonII.h
+++ b/common/rfb/CSecurityMSLogonII.h
@@ -33,9 +33,9 @@ namespace rfb {
public:
CSecurityMSLogonII(CConnection* cc);
virtual ~CSecurityMSLogonII();
- virtual bool processMsg();
- virtual int getType() const { return secTypeMSLogonII; }
- virtual bool isSecure() const { return false; }
+ bool processMsg() override;
+ int getType() const override { return secTypeMSLogonII; }
+ bool isSecure() const override { return false; }
private:
bool readKey();
diff --git a/common/rfb/CSecurityNone.h b/common/rfb/CSecurityNone.h
index cb887914..98379c73 100644
--- a/common/rfb/CSecurityNone.h
+++ b/common/rfb/CSecurityNone.h
@@ -30,8 +30,8 @@ namespace rfb {
class CSecurityNone : public CSecurity {
public:
CSecurityNone(CConnection* cc) : CSecurity(cc) {}
- virtual bool processMsg() { return true; }
- virtual int getType() const {return secTypeNone;}
+ bool processMsg() override { return true; }
+ int getType() const override {return secTypeNone;}
};
}
#endif
diff --git a/common/rfb/CSecurityPlain.h b/common/rfb/CSecurityPlain.h
index add7e776..0cc9e8ed 100644
--- a/common/rfb/CSecurityPlain.h
+++ b/common/rfb/CSecurityPlain.h
@@ -27,8 +27,8 @@ namespace rfb {
class CSecurityPlain : public CSecurity {
public:
CSecurityPlain(CConnection* cc) : CSecurity(cc) {}
- virtual bool processMsg();
- virtual int getType() const { return secTypePlain; }
+ bool processMsg() override;
+ int getType() const override { return secTypePlain; }
};
}
#endif
diff --git a/common/rfb/CSecurityRSAAES.h b/common/rfb/CSecurityRSAAES.h
index 543b0152..29bfd575 100644
--- a/common/rfb/CSecurityRSAAES.h
+++ b/common/rfb/CSecurityRSAAES.h
@@ -39,9 +39,9 @@ namespace rfb {
CSecurityRSAAES(CConnection* cc, uint32_t secType,
int keySize, bool isAllEncrypted);
virtual ~CSecurityRSAAES();
- virtual bool processMsg();
- virtual int getType() const { return secType; }
- virtual bool isSecure() const { return secType == secTypeRA256; }
+ bool processMsg() override;
+ int getType() const override { return secType; }
+ bool isSecure() const override { return secType == secTypeRA256; }
static IntParameter RSAKeyLength;
diff --git a/common/rfb/CSecurityStack.h b/common/rfb/CSecurityStack.h
index 8eadc151..521597ec 100644
--- a/common/rfb/CSecurityStack.h
+++ b/common/rfb/CSecurityStack.h
@@ -30,9 +30,9 @@ namespace rfb {
CSecurityStack(CConnection* cc, int Type,
CSecurity* s0 = nullptr, CSecurity* s1 = nullptr);
~CSecurityStack();
- virtual bool processMsg();
- virtual int getType() const {return type;};
- virtual bool isSecure() const;
+ bool processMsg() override;
+ int getType() const override {return type;};
+ bool isSecure() const override;
protected:
int state;
CSecurity* state0;
diff --git a/common/rfb/CSecurityTLS.h b/common/rfb/CSecurityTLS.h
index b9c345cf..8688b742 100644
--- a/common/rfb/CSecurityTLS.h
+++ b/common/rfb/CSecurityTLS.h
@@ -38,9 +38,9 @@ namespace rfb {
public:
CSecurityTLS(CConnection* cc, bool _anon);
virtual ~CSecurityTLS();
- virtual bool processMsg();
- virtual int getType() const { return anon ? secTypeTLSNone : secTypeX509None; }
- virtual bool isSecure() const { return !anon; }
+ bool processMsg() override;
+ int getType() const override { return anon ? secTypeTLSNone : secTypeX509None; }
+ bool isSecure() const override { return !anon; }
static StringParameter X509CA;
static StringParameter X509CRL;
diff --git a/common/rfb/CSecurityVeNCrypt.h b/common/rfb/CSecurityVeNCrypt.h
index 476bf813..f73e7927 100644
--- a/common/rfb/CSecurityVeNCrypt.h
+++ b/common/rfb/CSecurityVeNCrypt.h
@@ -37,9 +37,9 @@ namespace rfb {
CSecurityVeNCrypt(CConnection* cc, SecurityClient* sec);
~CSecurityVeNCrypt();
- virtual bool processMsg();
- int getType() const {return chosenType;}
- virtual bool isSecure() const;
+ bool processMsg() override;
+ int getType() const override {return chosenType;}
+ bool isSecure() const override;
protected:
CSecurity *csecurity;
diff --git a/common/rfb/CSecurityVncAuth.h b/common/rfb/CSecurityVncAuth.h
index 3f1f315b..66a6c92d 100644
--- a/common/rfb/CSecurityVncAuth.h
+++ b/common/rfb/CSecurityVncAuth.h
@@ -27,8 +27,8 @@ namespace rfb {
public:
CSecurityVncAuth(CConnection* cc) : CSecurity(cc) {}
virtual ~CSecurityVncAuth() {}
- virtual bool processMsg();
- virtual int getType() const {return secTypeVncAuth;};
+ bool processMsg() override;
+ int getType() const override {return secTypeVncAuth;};
};
}
#endif
diff --git a/common/rfb/Configuration.h b/common/rfb/Configuration.h
index 0c572cfa..ec8d789a 100644
--- a/common/rfb/Configuration.h
+++ b/common/rfb/Configuration.h
@@ -196,12 +196,12 @@ namespace rfb {
public:
AliasParameter(const char* name_, const char* desc_,VoidParameter* param_,
ConfigurationObject co=ConfGlobal);
- virtual bool setParam(const char* value);
- virtual bool setParam();
- virtual std::string getDefaultStr() const;
- virtual std::string getValueStr() const;
- virtual bool isBool() const;
- virtual void setImmutable();
+ bool setParam(const char* value) override;
+ bool setParam() override;
+ std::string getDefaultStr() const override;
+ std::string getValueStr() const override;
+ bool isBool() const override;
+ void setImmutable() override;
private:
VoidParameter* param;
};
@@ -210,12 +210,12 @@ namespace rfb {
public:
BoolParameter(const char* name_, const char* desc_, bool v,
ConfigurationObject co=ConfGlobal);
- virtual bool setParam(const char* value);
- virtual bool setParam();
+ bool setParam(const char* value) override;
+ bool setParam() override;
virtual void setParam(bool b);
- virtual std::string getDefaultStr() const;
- virtual std::string getValueStr() const;
- virtual bool isBool() const;
+ std::string getDefaultStr() const override;
+ std::string getValueStr() const override;
+ bool isBool() const override;
operator bool() const;
protected:
bool value;
@@ -228,10 +228,10 @@ namespace rfb {
int minValue=INT_MIN, int maxValue=INT_MAX,
ConfigurationObject co=ConfGlobal);
using VoidParameter::setParam;
- virtual bool setParam(const char* value);
+ bool setParam(const char* value) override;
virtual bool setParam(int v);
- virtual std::string getDefaultStr() const;
- virtual std::string getValueStr() const;
+ std::string getDefaultStr() const override;
+ std::string getValueStr() const override;
operator int() const;
protected:
int value;
@@ -245,10 +245,10 @@ namespace rfb {
// be Null, and so neither can the default value!
StringParameter(const char* name_, const char* desc_, const char* v,
ConfigurationObject co=ConfGlobal);
- virtual ~StringParameter();
- virtual bool setParam(const char* value);
- virtual std::string getDefaultStr() const;
- virtual std::string getValueStr() const;
+ ~StringParameter() override;
+ bool setParam(const char* value) override;
+ std::string getDefaultStr() const override;
+ std::string getValueStr() const override;
operator const char*() const;
protected:
std::string value;
@@ -261,11 +261,11 @@ namespace rfb {
const uint8_t* v, size_t l,
ConfigurationObject co=ConfGlobal);
using VoidParameter::setParam;
- virtual ~BinaryParameter();
- virtual bool setParam(const char* value);
+ ~BinaryParameter() override;
+ bool setParam(const char* value) override;
virtual void setParam(const uint8_t* v, size_t l);
- virtual std::string getDefaultStr() const;
- virtual std::string getValueStr() const;
+ std::string getDefaultStr() const override;
+ std::string getValueStr() const override;
std::vector<uint8_t> getData() const;
diff --git a/common/rfb/CopyRectDecoder.h b/common/rfb/CopyRectDecoder.h
index c9f9c890..51651196 100644
--- a/common/rfb/CopyRectDecoder.h
+++ b/common/rfb/CopyRectDecoder.h
@@ -26,14 +26,15 @@ namespace rfb {
public:
CopyRectDecoder();
virtual ~CopyRectDecoder();
- virtual bool readRect(const Rect& r, rdr::InStream* is,
- const ServerParams& server, rdr::OutStream* os);
- virtual void getAffectedRegion(const Rect& rect, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- Region* region);
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- ModifiablePixelBuffer* pb);
+ bool readRect(const Rect& r, rdr::InStream* is,
+ const ServerParams& server,
+ rdr::OutStream* os) override;
+ void getAffectedRegion(const Rect& rect, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ Region* region) override;
+ void decodeRect(const Rect& r, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ ModifiablePixelBuffer* pb) override;
};
}
#endif
diff --git a/common/rfb/Cursor.h b/common/rfb/Cursor.h
index 31d6fda9..c71f5a77 100644
--- a/common/rfb/Cursor.h
+++ b/common/rfb/Cursor.h
@@ -62,7 +62,7 @@ namespace rfb {
Rect getEffectiveRect() const { return buffer.getRect(offset); }
- virtual const uint8_t* getBuffer(const Rect& r, int* stride) const;
+ const uint8_t* getBuffer(const Rect& r, int* stride) const override;
void update(PixelBuffer* framebuffer, Cursor* cursor, const Point& pos);
diff --git a/common/rfb/DecodeManager.h b/common/rfb/DecodeManager.h
index a8e0cac9..5435bfc1 100644
--- a/common/rfb/DecodeManager.h
+++ b/common/rfb/DecodeManager.h
@@ -98,7 +98,7 @@ namespace rfb {
void stop();
protected:
- void worker();
+ void worker() override;
DecodeManager::QueueEntry* findEntry();
private:
diff --git a/common/rfb/EncodeManager.h b/common/rfb/EncodeManager.h
index 33484db8..a01a1614 100644
--- a/common/rfb/EncodeManager.h
+++ b/common/rfb/EncodeManager.h
@@ -61,7 +61,7 @@ namespace rfb {
size_t maxUpdateSize);
protected:
- virtual void handleTimeout(Timer* t);
+ void handleTimeout(Timer* t) override;
void doUpdate(bool allowLossy, const Region& changed,
const Region& copied, const Point& copy_delta,
@@ -142,7 +142,7 @@ namespace rfb {
const uint8_t* data_, int stride);
private:
- virtual uint8_t* getBufferRW(const Rect& r, int* stride);
+ uint8_t* getBufferRW(const Rect& r, int* stride) override;
};
OffsetPixelBuffer offsetPixelBuffer;
diff --git a/common/rfb/H264Decoder.h b/common/rfb/H264Decoder.h
index b4f5553e..8ba47799 100644
--- a/common/rfb/H264Decoder.h
+++ b/common/rfb/H264Decoder.h
@@ -33,11 +33,12 @@ namespace rfb {
public:
H264Decoder();
virtual ~H264Decoder();
- virtual bool readRect(const Rect& r, rdr::InStream* is,
- const ServerParams& server, rdr::OutStream* os);
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- ModifiablePixelBuffer* pb);
+ bool readRect(const Rect& r, rdr::InStream* is,
+ const ServerParams& server,
+ rdr::OutStream* os) override;
+ void decodeRect(const Rect& r, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ ModifiablePixelBuffer* pb) override;
private:
void resetContexts();
diff --git a/common/rfb/H264LibavDecoderContext.h b/common/rfb/H264LibavDecoderContext.h
index 148ba1ad..f399b3cc 100644
--- a/common/rfb/H264LibavDecoderContext.h
+++ b/common/rfb/H264LibavDecoderContext.h
@@ -34,12 +34,12 @@ namespace rfb {
H264LibavDecoderContext(const Rect &r) : H264DecoderContext(r) {}
~H264LibavDecoderContext() { freeCodec(); }
- virtual void decode(const uint8_t* h264_buffer, uint32_t len,
- ModifiablePixelBuffer* pb);
+ void decode(const uint8_t* h264_buffer, uint32_t len,
+ ModifiablePixelBuffer* pb) override;
protected:
- virtual bool initCodec();
- virtual void freeCodec();
+ bool initCodec() override;
+ void freeCodec() override;
private:
uint8_t* makeH264WorkBuffer(const uint8_t* buffer, uint32_t len);
diff --git a/common/rfb/H264WinDecoderContext.h b/common/rfb/H264WinDecoderContext.h
index 702d8dd6..92041781 100644
--- a/common/rfb/H264WinDecoderContext.h
+++ b/common/rfb/H264WinDecoderContext.h
@@ -33,12 +33,12 @@ namespace rfb {
H264WinDecoderContext(const Rect &r) : H264DecoderContext(r) {};
~H264WinDecoderContext() { freeCodec(); }
- virtual void decode(const uint8_t* h264_buffer, uint32_t len,
- ModifiablePixelBuffer* pb);
+ void decode(const uint8_t* h264_buffer, uint32_t len,
+ ModifiablePixelBuffer* pb) override;
protected:
- virtual bool initCodec();
- virtual void freeCodec();
+ bool initCodec() override;
+ void freeCodec() override;
private:
LONG stride;
diff --git a/common/rfb/HextileDecoder.h b/common/rfb/HextileDecoder.h
index 9163b5bb..38e8b776 100644
--- a/common/rfb/HextileDecoder.h
+++ b/common/rfb/HextileDecoder.h
@@ -29,11 +29,12 @@ namespace rfb {
public:
HextileDecoder();
virtual ~HextileDecoder();
- virtual bool readRect(const Rect& r, rdr::InStream* is,
- const ServerParams& server, rdr::OutStream* os);
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- ModifiablePixelBuffer* pb);
+ bool readRect(const Rect& r, rdr::InStream* is,
+ const ServerParams& server,
+ rdr::OutStream* os) override;
+ void decodeRect(const Rect& r, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ ModifiablePixelBuffer* pb) override;
private:
template<class T>
inline T readPixel(rdr::InStream* is);
diff --git a/common/rfb/HextileEncoder.h b/common/rfb/HextileEncoder.h
index 20721b7c..55f0508d 100644
--- a/common/rfb/HextileEncoder.h
+++ b/common/rfb/HextileEncoder.h
@@ -27,11 +27,11 @@ namespace rfb {
public:
HextileEncoder(SConnection* conn);
virtual ~HextileEncoder();
- virtual bool isSupported();
- virtual void writeRect(const PixelBuffer* pb, const Palette& palette);
- virtual void writeSolidRect(int width, int height,
- const PixelFormat& pf,
- const uint8_t* colour);
+ bool isSupported() override;
+ void writeRect(const PixelBuffer* pb,
+ const Palette& palette) override;
+ void writeSolidRect(int width, int height, const PixelFormat& pf,
+ const uint8_t* colour) override;
private:
template<class T>
inline void writePixel(rdr::OutStream* os, T pixel);
diff --git a/common/rfb/KeyRemapper.cxx b/common/rfb/KeyRemapper.cxx
index 762eb413..328955d7 100644
--- a/common/rfb/KeyRemapper.cxx
+++ b/common/rfb/KeyRemapper.cxx
@@ -89,7 +89,7 @@ public:
: StringParameter("RemapKeys", "Comma-separated list of incoming keysyms to remap. Mappings are expressed as two hex values, prefixed by 0x, and separated by ->", "") {
KeyRemapper::defInstance.setMapping("");
}
- bool setParam(const char* v) {
+ bool setParam(const char* v) override {
KeyRemapper::defInstance.setMapping(v);
return StringParameter::setParam(v);
}
diff --git a/common/rfb/LogWriter.h b/common/rfb/LogWriter.h
index 6eff6da1..d1fd4990 100644
--- a/common/rfb/LogWriter.h
+++ b/common/rfb/LogWriter.h
@@ -104,7 +104,7 @@ namespace rfb {
class LogParameter : public StringParameter {
public:
LogParameter();
- virtual bool setParam(const char* v);
+ bool setParam(const char* v) override;
};
extern LogParameter logParams;
diff --git a/common/rfb/Logger_file.h b/common/rfb/Logger_file.h
index 4542d23c..6f2a4ef6 100644
--- a/common/rfb/Logger_file.h
+++ b/common/rfb/Logger_file.h
@@ -35,7 +35,7 @@ namespace rfb {
Logger_File(const char* loggerName);
~Logger_File();
- virtual void write(int level, const char *logname, const char *message);
+ void write(int level, const char *logname, const char *message) override;
void setFilename(const char* filename);
void setFile(FILE* file);
diff --git a/common/rfb/Logger_syslog.h b/common/rfb/Logger_syslog.h
index cf987281..20c46a5f 100644
--- a/common/rfb/Logger_syslog.h
+++ b/common/rfb/Logger_syslog.h
@@ -31,7 +31,7 @@ namespace rfb {
Logger_Syslog(const char* loggerName);
virtual ~Logger_Syslog();
- virtual void write(int level, const char *logname, const char *message);
+ void write(int level, const char *logname, const char *message) override;
};
void initSyslogLogger();
diff --git a/common/rfb/PixelBuffer.h b/common/rfb/PixelBuffer.h
index 33a9c7ae..963fbbf6 100644
--- a/common/rfb/PixelBuffer.h
+++ b/common/rfb/PixelBuffer.h
@@ -151,16 +151,16 @@ namespace rfb {
virtual ~FullFramePixelBuffer();
public:
- virtual const uint8_t* getBuffer(const Rect& r, int* stride) const;
- virtual uint8_t* getBufferRW(const Rect& r, int* stride);
- virtual void commitBufferRW(const Rect& r);
+ const uint8_t* getBuffer(const Rect& r, int* stride) const override;
+ uint8_t* getBufferRW(const Rect& r, int* stride) override;
+ void commitBufferRW(const Rect& r) override;
protected:
FullFramePixelBuffer();
virtual void setBuffer(int width, int height, uint8_t* data, int stride);
private:
- virtual void setSize(int w, int h);
+ void setSize(int w, int h) override;
private:
uint8_t* data;
@@ -178,7 +178,7 @@ namespace rfb {
// Manage the pixel buffer layout
virtual void setPF(const PixelFormat &pf);
- virtual void setSize(int w, int h);
+ void setSize(int w, int h) override;
private:
uint8_t* data_; // Mirrors FullFramePixelBuffer::data
diff --git a/common/rfb/RREDecoder.h b/common/rfb/RREDecoder.h
index a1d7f9b8..8490146c 100644
--- a/common/rfb/RREDecoder.h
+++ b/common/rfb/RREDecoder.h
@@ -29,11 +29,12 @@ namespace rfb {
public:
RREDecoder();
virtual ~RREDecoder();
- virtual bool readRect(const Rect& r, rdr::InStream* is,
- const ServerParams& server, rdr::OutStream* os);
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- ModifiablePixelBuffer* pb);
+ bool readRect(const Rect& r, rdr::InStream* is,
+ const ServerParams& server,
+ rdr::OutStream* os) override;
+ void decodeRect(const Rect& r, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ ModifiablePixelBuffer* pb) override;
private:
template<class T>
inline T readPixel(rdr::InStream* is);
diff --git a/common/rfb/RREEncoder.h b/common/rfb/RREEncoder.h
index b13135b4..e21586ec 100644
--- a/common/rfb/RREEncoder.h
+++ b/common/rfb/RREEncoder.h
@@ -29,11 +29,11 @@ namespace rfb {
public:
RREEncoder(SConnection* conn);
virtual ~RREEncoder();
- virtual bool isSupported();
- virtual void writeRect(const PixelBuffer* pb, const Palette& palette);
- virtual void writeSolidRect(int width, int height,
- const PixelFormat& pf,
- const uint8_t* colour);
+ bool isSupported() override;
+ void writeRect(const PixelBuffer* pb,
+ const Palette& palette) override;
+ void writeSolidRect(int width, int height, const PixelFormat& pf,
+ const uint8_t* colour) override;
private:
template<class T>
inline void writePixel(rdr::OutStream* os, T pixel);
diff --git a/common/rfb/RawDecoder.h b/common/rfb/RawDecoder.h
index 33948ced..2ac8b0bd 100644
--- a/common/rfb/RawDecoder.h
+++ b/common/rfb/RawDecoder.h
@@ -25,11 +25,12 @@ namespace rfb {
public:
RawDecoder();
virtual ~RawDecoder();
- virtual bool readRect(const Rect& r, rdr::InStream* is,
- const ServerParams& server, rdr::OutStream* os);
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- ModifiablePixelBuffer* pb);
+ bool readRect(const Rect& r, rdr::InStream* is,
+ const ServerParams& server,
+ rdr::OutStream* os) override;
+ void decodeRect(const Rect& r, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ ModifiablePixelBuffer* pb) override;
};
}
#endif
diff --git a/common/rfb/RawEncoder.h b/common/rfb/RawEncoder.h
index 76da4c5b..e191645c 100644
--- a/common/rfb/RawEncoder.h
+++ b/common/rfb/RawEncoder.h
@@ -27,11 +27,11 @@ namespace rfb {
public:
RawEncoder(SConnection* conn);
virtual ~RawEncoder();
- virtual bool isSupported();
- virtual void writeRect(const PixelBuffer* pb, const Palette& palette);
- virtual void writeSolidRect(int width, int height,
- const PixelFormat& pf,
- const uint8_t* colour);
+ bool isSupported() override;
+ void writeRect(const PixelBuffer* pb,
+ const Palette& palette) override;
+ void writeSolidRect(int width, int height, const PixelFormat& pf,
+ const uint8_t* colour) override;
};
}
#endif
diff --git a/common/rfb/SConnection.h b/common/rfb/SConnection.h
index fb3ae15a..2ac53269 100644
--- a/common/rfb/SConnection.h
+++ b/common/rfb/SConnection.h
@@ -83,18 +83,17 @@ namespace rfb {
// Overridden from SMsgHandler
- virtual void setEncodings(int nEncodings, const int32_t* encodings);
+ void setEncodings(int nEncodings, const int32_t* encodings) override;
- virtual void clientCutText(const char* str);
+ void clientCutText(const char* str) override;
- virtual void handleClipboardRequest(uint32_t flags);
- virtual void handleClipboardPeek();
- virtual void handleClipboardNotify(uint32_t flags);
- virtual void handleClipboardProvide(uint32_t flags,
- const size_t* lengths,
- const uint8_t* const* data);
+ void handleClipboardRequest(uint32_t flags) override;
+ void handleClipboardPeek() override;
+ void handleClipboardNotify(uint32_t flags) override;
+ void handleClipboardProvide(uint32_t flags, const size_t* lengths,
+ const uint8_t* const* data) override;
- virtual void supportsQEMUKeyEvent();
+ void supportsQEMUKeyEvent() override;
// Methods to be overridden in a derived class
@@ -118,27 +117,27 @@ namespace rfb {
// clientInit() is called when the ClientInit message is received. The
// derived class must call on to SConnection::clientInit().
- virtual void clientInit(bool shared);
+ void clientInit(bool shared) override;
// setPixelFormat() is called when a SetPixelFormat message is received.
// The derived class must call on to SConnection::setPixelFormat().
- virtual void setPixelFormat(const PixelFormat& pf);
+ void setPixelFormat(const PixelFormat& pf) override;
// framebufferUpdateRequest() is called when a FramebufferUpdateRequest
// message is received. The derived class must call on to
// SConnection::framebufferUpdateRequest().
- virtual void framebufferUpdateRequest(const Rect& r, bool incremental);
+ void framebufferUpdateRequest(const Rect& r, bool incremental) override;
// fence() is called when we get a fence request or response. By default
// it responds directly to requests (stating it doesn't support any
// synchronisation) and drops responses. Override to implement more proper
// support.
- virtual void fence(uint32_t flags, unsigned len, const uint8_t data[]);
+ void fence(uint32_t flags, unsigned len, const uint8_t data[]) override;
// enableContinuousUpdates() is called when the client wants to enable
// or disable continuous updates, or change the active area.
- virtual void enableContinuousUpdates(bool enable,
- int x, int y, int w, int h);
+ void enableContinuousUpdates(bool enable,
+ int x, int y, int w, int h) override;
// handleClipboardRequest() is called whenever the client requests
// the server to send over its clipboard data. It will only be
diff --git a/common/rfb/SDesktop.h b/common/rfb/SDesktop.h
index b660f496..94fcaa28 100644
--- a/common/rfb/SDesktop.h
+++ b/common/rfb/SDesktop.h
@@ -145,12 +145,12 @@ namespace rfb {
if (buffer) delete buffer;
}
- virtual void init(VNCServer* vs) {
+ void init(VNCServer* vs) override {
server = vs;
server->setPixelBuffer(buffer);
}
- virtual void queryConnection(network::Socket* sock,
- const char* /*userName*/) {
+ void queryConnection(network::Socket* sock,
+ const char* /*userName*/) override {
server->approveConnection(sock, true, nullptr);
}
diff --git a/common/rfb/SSecurityNone.h b/common/rfb/SSecurityNone.h
index 019fc133..944edf8c 100644
--- a/common/rfb/SSecurityNone.h
+++ b/common/rfb/SSecurityNone.h
@@ -29,9 +29,9 @@ namespace rfb {
class SSecurityNone : public SSecurity {
public:
SSecurityNone(SConnection* sc) : SSecurity(sc) {}
- virtual bool processMsg() { return true; }
- virtual int getType() const {return secTypeNone;}
- virtual const char* getUserName() const {return nullptr;}
+ bool processMsg() override { return true; }
+ int getType() const override {return secTypeNone;}
+ const char* getUserName() const override {return nullptr;}
};
}
#endif
diff --git a/common/rfb/SSecurityPlain.h b/common/rfb/SSecurityPlain.h
index 4ca72781..c0ac049b 100644
--- a/common/rfb/SSecurityPlain.h
+++ b/common/rfb/SSecurityPlain.h
@@ -43,9 +43,9 @@ namespace rfb {
class SSecurityPlain : public SSecurity {
public:
SSecurityPlain(SConnection* sc);
- virtual bool processMsg();
- virtual int getType() const { return secTypePlain; };
- virtual const char* getUserName() const { return username; }
+ bool processMsg() override;
+ int getType() const override { return secTypePlain; };
+ const char* getUserName() const override { return username; }
virtual ~SSecurityPlain() { }
diff --git a/common/rfb/SSecurityRSAAES.h b/common/rfb/SSecurityRSAAES.h
index 0c4fc852..edac35c6 100644
--- a/common/rfb/SSecurityRSAAES.h
+++ b/common/rfb/SSecurityRSAAES.h
@@ -36,10 +36,10 @@ namespace rfb {
SSecurityRSAAES(SConnection* sc, uint32_t secType,
int keySize, bool isAllEncrypted);
virtual ~SSecurityRSAAES();
- virtual bool processMsg();
- virtual const char* getUserName() const;
- virtual int getType() const { return secType; }
- virtual AccessRights getAccessRights() const
+ bool processMsg() override;
+ const char* getUserName() const override;
+ int getType() const override {return secType;}
+ AccessRights getAccessRights() const override
{
return accessRights;
}
diff --git a/common/rfb/SSecurityStack.h b/common/rfb/SSecurityStack.h
index 90a6e7c0..d2949a21 100644
--- a/common/rfb/SSecurityStack.h
+++ b/common/rfb/SSecurityStack.h
@@ -29,10 +29,10 @@ namespace rfb {
SSecurityStack(SConnection* sc, int Type,
SSecurity* s0 = nullptr, SSecurity* s1 = nullptr);
~SSecurityStack();
- virtual bool processMsg();
- virtual int getType() const { return type; };
- virtual const char* getUserName() const;
- virtual AccessRights getAccessRights() const;
+ bool processMsg() override;
+ int getType() const override { return type; };
+ const char* getUserName() const override;
+ AccessRights getAccessRights() const override;
protected:
short state;
SSecurity* state0;
diff --git a/common/rfb/SSecurityTLS.h b/common/rfb/SSecurityTLS.h
index a68fd0f2..0b9ea9f3 100644
--- a/common/rfb/SSecurityTLS.h
+++ b/common/rfb/SSecurityTLS.h
@@ -45,9 +45,9 @@ namespace rfb {
public:
SSecurityTLS(SConnection* sc, bool _anon);
virtual ~SSecurityTLS();
- virtual bool processMsg();
- virtual const char* getUserName() const {return nullptr;}
- virtual int getType() const { return anon ? secTypeTLSNone : secTypeX509None;}
+ bool processMsg() override;
+ const char* getUserName() const override {return nullptr;}
+ int getType() const override { return anon ? secTypeTLSNone : secTypeX509None;}
static StringParameter X509_CertFile;
static StringParameter X509_KeyFile;
diff --git a/common/rfb/SSecurityVeNCrypt.h b/common/rfb/SSecurityVeNCrypt.h
index 91713f89..ea2bb6fb 100644
--- a/common/rfb/SSecurityVeNCrypt.h
+++ b/common/rfb/SSecurityVeNCrypt.h
@@ -34,10 +34,10 @@ namespace rfb {
public:
SSecurityVeNCrypt(SConnection* sc, SecurityServer *sec);
~SSecurityVeNCrypt();
- virtual bool processMsg();
- virtual int getType() const { return chosenType; }
- virtual const char* getUserName() const;
- virtual AccessRights getAccessRights() const;
+ bool processMsg() override;
+ int getType() const override { return chosenType; }
+ const char* getUserName() const override;
+ AccessRights getAccessRights() const override;
protected:
SSecurity *ssecurity;
diff --git a/common/rfb/SSecurityVncAuth.h b/common/rfb/SSecurityVncAuth.h
index 9c00aa52..532abe0a 100644
--- a/common/rfb/SSecurityVncAuth.h
+++ b/common/rfb/SSecurityVncAuth.h
@@ -44,7 +44,7 @@ namespace rfb {
class VncAuthPasswdParameter : public VncAuthPasswdGetter, BinaryParameter {
public:
VncAuthPasswdParameter(const char* name, const char* desc, StringParameter* passwdFile_);
- virtual void getVncAuthPasswd(std::string *password, std::string *readOnlyPassword);
+ void getVncAuthPasswd(std::string *password, std::string *readOnlyPassword) override;
protected:
StringParameter* passwdFile;
};
@@ -52,10 +52,10 @@ namespace rfb {
class SSecurityVncAuth : public SSecurity {
public:
SSecurityVncAuth(SConnection* sc);
- virtual bool processMsg();
- virtual int getType() const {return secTypeVncAuth;}
- virtual const char* getUserName() const {return nullptr;}
- virtual AccessRights getAccessRights() const { return accessRights; }
+ bool processMsg() override;
+ int getType() const override {return secTypeVncAuth;}
+ const char* getUserName() const override {return nullptr;}
+ AccessRights getAccessRights() const override { return accessRights; }
static StringParameter vncAuthPasswdFile;
static VncAuthPasswdParameter vncAuthPasswd;
private:
diff --git a/common/rfb/TightDecoder.h b/common/rfb/TightDecoder.h
index 764f138e..d569a7fd 100644
--- a/common/rfb/TightDecoder.h
+++ b/common/rfb/TightDecoder.h
@@ -31,18 +31,17 @@ namespace rfb {
public:
TightDecoder();
virtual ~TightDecoder();
- virtual bool readRect(const Rect& r, rdr::InStream* is,
- const ServerParams& server, rdr::OutStream* os);
- virtual bool doRectsConflict(const Rect& rectA,
- const uint8_t* bufferA,
- size_t buflenA,
- const Rect& rectB,
- const uint8_t* bufferB,
- size_t buflenB,
- const ServerParams& server);
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- ModifiablePixelBuffer* pb);
+ bool readRect(const Rect& r, rdr::InStream* is,
+ const ServerParams& server,
+ rdr::OutStream* os) override;
+ bool doRectsConflict(const Rect& rectA,
+ const uint8_t* bufferA, size_t buflenA,
+ const Rect& rectB,
+ const uint8_t* bufferB, size_t buflenB,
+ const ServerParams& server) override;
+ void decodeRect(const Rect& r, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ ModifiablePixelBuffer* pb) override;
private:
uint32_t readCompact(rdr::InStream* is);
diff --git a/common/rfb/TightEncoder.h b/common/rfb/TightEncoder.h
index 0608eb09..3a7210c7 100644
--- a/common/rfb/TightEncoder.h
+++ b/common/rfb/TightEncoder.h
@@ -31,14 +31,14 @@ namespace rfb {
TightEncoder(SConnection* conn);
virtual ~TightEncoder();
- virtual bool isSupported();
+ bool isSupported() override;
- virtual void setCompressLevel(int level);
+ void setCompressLevel(int level) override;
- virtual void writeRect(const PixelBuffer* pb, const Palette& palette);
- virtual void writeSolidRect(int width, int height,
- const PixelFormat& pf,
- const uint8_t* colour);
+ void writeRect(const PixelBuffer* pb,
+ const Palette& palette) override;
+ void writeSolidRect(int width, int height, const PixelFormat& pf,
+ const uint8_t* colour) override;
protected:
void writeMonoRect(const PixelBuffer* pb, const Palette& palette);
diff --git a/common/rfb/TightJPEGEncoder.h b/common/rfb/TightJPEGEncoder.h
index 002deabb..81d9f40d 100644
--- a/common/rfb/TightJPEGEncoder.h
+++ b/common/rfb/TightJPEGEncoder.h
@@ -30,17 +30,17 @@ namespace rfb {
TightJPEGEncoder(SConnection* conn);
virtual ~TightJPEGEncoder();
- virtual bool isSupported();
+ bool isSupported() override;
- virtual void setQualityLevel(int level);
- virtual void setFineQualityLevel(int quality, int subsampling);
+ void setQualityLevel(int level) override;
+ void setFineQualityLevel(int quality, int subsampling) override;
- virtual int getQualityLevel();
+ int getQualityLevel() override;
- virtual void writeRect(const PixelBuffer* pb, const Palette& palette);
- virtual void writeSolidRect(int width, int height,
- const PixelFormat& pf,
- const uint8_t* colour);
+ void writeRect(const PixelBuffer* pb,
+ const Palette& palette) override;
+ void writeSolidRect(int width, int height, const PixelFormat& pf,
+ const uint8_t* colour) override;
protected:
void writeCompact(uint32_t value, rdr::OutStream* os);
diff --git a/common/rfb/Timer.h b/common/rfb/Timer.h
index 36ec46c5..362cb84e 100644
--- a/common/rfb/Timer.h
+++ b/common/rfb/Timer.h
@@ -124,7 +124,7 @@ namespace rfb {
MethodTimer(T* obj_, void (T::*cb_)(Timer*))
: Timer(this), obj(obj_), cb(cb_) {}
- virtual void handleTimeout(Timer* t) { (obj->*cb)(t); }
+ void handleTimeout(Timer* t) override { return (obj->*cb)(t); }
private:
T* obj;
diff --git a/common/rfb/UnixPasswordValidator.h b/common/rfb/UnixPasswordValidator.h
index 28d083a1..4d623d6c 100644
--- a/common/rfb/UnixPasswordValidator.h
+++ b/common/rfb/UnixPasswordValidator.h
@@ -28,7 +28,7 @@ namespace rfb
class UnixPasswordValidator: public PasswordValidator {
protected:
bool validateInternal(SConnection * sc, const char *username,
- const char *password);
+ const char *password) override;
};
}
diff --git a/common/rfb/UpdateTracker.h b/common/rfb/UpdateTracker.h
index 1c31a168..e91b9621 100644
--- a/common/rfb/UpdateTracker.h
+++ b/common/rfb/UpdateTracker.h
@@ -59,8 +59,8 @@ namespace rfb {
void setUpdateTracker(UpdateTracker* ut_) {ut = ut_;}
void setClipRect(const Rect& cr) {clipRect = cr;}
- virtual void add_changed(const Region &region);
- virtual void add_copied(const Region &dest, const Point &delta);
+ void add_changed(const Region &region) override;
+ void add_copied(const Region &dest, const Point &delta) override;
protected:
UpdateTracker* ut;
Rect clipRect;
@@ -71,8 +71,8 @@ namespace rfb {
SimpleUpdateTracker();
virtual ~SimpleUpdateTracker();
- virtual void add_changed(const Region &region);
- virtual void add_copied(const Region &dest, const Point &delta);
+ void add_changed(const Region &region) override;
+ void add_copied(const Region &dest, const Point &delta) override;
virtual void subtract(const Region& region);
// Fill the supplied UpdateInfo structure with update information
diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h
index 3a9ec242..e9badd72 100644
--- a/common/rfb/VNCSConnectionST.h
+++ b/common/rfb/VNCSConnectionST.h
@@ -46,8 +46,8 @@ namespace rfb {
// SConnection methods
- virtual bool accessCheck(AccessRights ar) const;
- virtual void close(const char* reason);
+ bool accessCheck(AccessRights ar) const override;
+ void close(const char* reason) override;
using SConnection::authenticated;
@@ -118,30 +118,32 @@ namespace rfb {
private:
// SConnection callbacks
- // These methods are invoked as callbacks from processMsg()
-
- virtual void authSuccess();
- virtual void queryConnection(const char* userName);
- virtual void clientInit(bool shared);
- virtual void setPixelFormat(const PixelFormat& pf);
- virtual void pointerEvent(const Point& pos, int buttonMask);
- virtual void keyEvent(uint32_t keysym, uint32_t keycode, bool down);
- virtual void framebufferUpdateRequest(const Rect& r, bool incremental);
- virtual void setDesktopSize(int fb_width, int fb_height,
- const ScreenSet& layout);
- virtual void fence(uint32_t flags, unsigned len, const uint8_t data[]);
- virtual void enableContinuousUpdates(bool enable,
- int x, int y, int w, int h);
- virtual void handleClipboardRequest();
- virtual void handleClipboardAnnounce(bool available);
- virtual void handleClipboardData(const char* data);
- virtual void supportsLocalCursor();
- virtual void supportsFence();
- virtual void supportsContinuousUpdates();
- virtual void supportsLEDState();
+ // These methods are invoked as callbacks from processMsg(
+ void authSuccess() override;
+ void queryConnection(const char* userName) override;
+ void clientInit(bool shared) override;
+ void setPixelFormat(const PixelFormat& pf) override;
+ void pointerEvent(const Point& pos, int buttonMask) override;
+ void keyEvent(uint32_t keysym, uint32_t keycode,
+ bool down) override;
+ void framebufferUpdateRequest(const Rect& r,
+ bool incremental) override;
+ void setDesktopSize(int fb_width, int fb_height,
+ const ScreenSet& layout) override;
+ void fence(uint32_t flags, unsigned len,
+ const uint8_t data[]) override;
+ void enableContinuousUpdates(bool enable,
+ int x, int y, int w, int h) override;
+ void handleClipboardRequest() override;
+ void handleClipboardAnnounce(bool available) override;
+ void handleClipboardData(const char* data) override;
+ void supportsLocalCursor() override;
+ void supportsFence() override;
+ void supportsContinuousUpdates() override;
+ void supportsLEDState() override;
// Timer callbacks
- virtual void handleTimeout(Timer* t);
+ void handleTimeout(Timer* t) override;
// Internal methods
diff --git a/common/rfb/VNCServerST.h b/common/rfb/VNCServerST.h
index 8fbbf971..501882aa 100644
--- a/common/rfb/VNCServerST.h
+++ b/common/rfb/VNCServerST.h
@@ -56,54 +56,54 @@ namespace rfb {
// addSocket
// Causes the server to allocate an RFB-protocol management
// structure for the socket & initialise it.
- virtual void addSocket(network::Socket* sock, bool outgoing=false,
- AccessRights ar=AccessDefault);
+ void addSocket(network::Socket* sock, bool outgoing=false,
+ AccessRights ar=AccessDefault) override;
// removeSocket
// Clean up any resources associated with the Socket
- virtual void removeSocket(network::Socket* sock);
+ void removeSocket(network::Socket* sock) override;
// getSockets() gets a list of sockets. This can be used to generate an
// fd_set for calling select().
- virtual void getSockets(std::list<network::Socket*>* sockets);
+ void getSockets(std::list<network::Socket*>* sockets) override;
// processSocketReadEvent
// Read more RFB data from the Socket. If an error occurs during
// processing then shutdown() is called on the Socket, causing
// removeSocket() to be called by the caller at a later time.
- virtual void processSocketReadEvent(network::Socket* sock);
+ void processSocketReadEvent(network::Socket* sock) override;
// processSocketWriteEvent
// Flush pending data from the Socket on to the network.
- virtual void processSocketWriteEvent(network::Socket* sock);
-
- virtual void blockUpdates();
- virtual void unblockUpdates();
- virtual uint64_t getMsc();
- virtual void queueMsc(uint64_t target);
- virtual void setPixelBuffer(PixelBuffer* pb, const ScreenSet& layout);
- virtual void setPixelBuffer(PixelBuffer* pb);
- virtual void setScreenLayout(const ScreenSet& layout);
- virtual const PixelBuffer* getPixelBuffer() const { return pb; }
-
- virtual void requestClipboard();
- virtual void announceClipboard(bool available);
- virtual void sendClipboardData(const char* data);
-
- virtual void approveConnection(network::Socket* sock, bool accept,
- const char* reason);
- virtual void closeClients(const char* reason) {closeClients(reason, nullptr);}
- virtual SConnection* getConnection(network::Socket* sock);
-
- virtual void add_changed(const Region &region);
- virtual void add_copied(const Region &dest, const Point &delta);
- virtual void setCursor(int width, int height, const Point& hotspot,
- const uint8_t* data);
- virtual void setCursorPos(const Point& p, bool warped);
- virtual void setName(const char* name_);
- virtual void setLEDState(unsigned state);
-
- virtual void bell();
+ void processSocketWriteEvent(network::Socket* sock) override;
+
+ void blockUpdates() override;
+ void unblockUpdates() override;
+ uint64_t getMsc() override;
+ void queueMsc(uint64_t target) override;
+ void setPixelBuffer(PixelBuffer* pb, const ScreenSet& layout) override;
+ void setPixelBuffer(PixelBuffer* pb) override;
+ void setScreenLayout(const ScreenSet& layout) override;
+ const PixelBuffer* getPixelBuffer() const override { return pb; }
+
+ void requestClipboard() override;
+ void announceClipboard(bool available) override;
+ void sendClipboardData(const char* data) override;
+
+ void approveConnection(network::Socket* sock, bool accept,
+ const char* reason) override;
+ void closeClients(const char* reason) override {closeClients(reason, nullptr);}
+ SConnection* getConnection(network::Socket* sock) override;
+
+ void add_changed(const Region &region) override;
+ void add_copied(const Region &dest, const Point &delta) override;
+ void setCursor(int width, int height, const Point& hotspot,
+ const uint8_t* data) override;
+ void setCursorPos(const Point& p, bool warped) override;
+ void setName(const char* name_) override;
+ void setLEDState(unsigned state) override;
+
+ void bell() override;
// VNCServerST-only methods
@@ -155,7 +155,7 @@ namespace rfb {
protected:
// Timer callbacks
- virtual void handleTimeout(Timer* t);
+ void handleTimeout(Timer* t) override;
// - Internal methods
diff --git a/common/rfb/WinPasswdValidator.h b/common/rfb/WinPasswdValidator.h
index ef2310a9..340a6234 100644
--- a/common/rfb/WinPasswdValidator.h
+++ b/common/rfb/WinPasswdValidator.h
@@ -30,7 +30,7 @@ namespace rfb
WinPasswdValidator() {};
virtual ~WinPasswdValidator() {};
protected:
- bool validateInternal(SConnection *sc, const char* username, const char* password);
+ bool validateInternal(SConnection *sc, const char* username, const char* password) override;
};
}
diff --git a/common/rfb/ZRLEDecoder.h b/common/rfb/ZRLEDecoder.h
index e72bf1b6..9ed2c2c8 100644
--- a/common/rfb/ZRLEDecoder.h
+++ b/common/rfb/ZRLEDecoder.h
@@ -30,11 +30,12 @@ namespace rfb {
public:
ZRLEDecoder();
virtual ~ZRLEDecoder();
- virtual bool readRect(const Rect& r, rdr::InStream* is,
- const ServerParams& server, rdr::OutStream* os);
- virtual void decodeRect(const Rect& r, const uint8_t* buffer,
- size_t buflen, const ServerParams& server,
- ModifiablePixelBuffer* pb);
+ bool readRect(const Rect& r, rdr::InStream* is,
+ const ServerParams& server,
+ rdr::OutStream* os) override;
+ void decodeRect(const Rect& r, const uint8_t* buffer,
+ size_t buflen, const ServerParams& server,
+ ModifiablePixelBuffer* pb) override;
private:
template<class T>
diff --git a/common/rfb/ZRLEEncoder.h b/common/rfb/ZRLEEncoder.h
index fa89f10f..87d87e94 100644
--- a/common/rfb/ZRLEEncoder.h
+++ b/common/rfb/ZRLEEncoder.h
@@ -30,14 +30,14 @@ namespace rfb {
ZRLEEncoder(SConnection* conn);
virtual ~ZRLEEncoder();
- virtual bool isSupported();
+ bool isSupported() override;
- virtual void setCompressLevel(int level);
+ void setCompressLevel(int level) override;
- virtual void writeRect(const PixelBuffer* pb, const Palette& palette);
- virtual void writeSolidRect(int width, int height,
- const PixelFormat& pf,
- const uint8_t* colour);
+ void writeRect(const PixelBuffer* pb,
+ const Palette& palette) override;
+ void writeSolidRect(int width, int height, const PixelFormat& pf,
+ const uint8_t* colour) override;
protected:
void writePaletteTile(const Rect& tile, const PixelBuffer* pb,
diff --git a/tests/perf/decperf.cxx b/tests/perf/decperf.cxx
index 87370a4c..66a50d02 100644
--- a/tests/perf/decperf.cxx
+++ b/tests/perf/decperf.cxx
@@ -52,11 +52,11 @@ class DummyOutStream : public rdr::OutStream {
public:
DummyOutStream();
- virtual size_t length();
- virtual void flush();
+ size_t length() override;
+ void flush() override;
private:
- virtual void overrun(size_t needed);
+ void overrun(size_t needed) override;
int offset;
uint8_t buf[131072];
@@ -67,15 +67,15 @@ public:
CConn(const char *filename);
~CConn();
- virtual void initDone();
- virtual void setPixelFormat(const rfb::PixelFormat& pf);
- virtual void setCursor(int, int, const rfb::Point&, const uint8_t*);
- virtual void setCursorPos(const rfb::Point&);
- virtual void framebufferUpdateStart();
- virtual void framebufferUpdateEnd();
- virtual void setColourMapEntries(int, int, uint16_t*);
- virtual void bell();
- virtual void serverCutText(const char*);
+ void initDone() override;
+ void setPixelFormat(const rfb::PixelFormat& pf) override;
+ void setCursor(int, int, const rfb::Point&, const uint8_t*) override;
+ void setCursorPos(const rfb::Point&) override;
+ void framebufferUpdateStart() override;
+ void framebufferUpdateEnd() override;
+ void setColourMapEntries(int, int, uint16_t*) override;
+ void bell() override;
+ void serverCutText(const char*) override;
public:
double cpuTime;
diff --git a/tests/perf/encperf.cxx b/tests/perf/encperf.cxx
index 7cc51f29..904363a0 100644
--- a/tests/perf/encperf.cxx
+++ b/tests/perf/encperf.cxx
@@ -80,11 +80,11 @@ class DummyOutStream : public rdr::OutStream {
public:
DummyOutStream();
- virtual size_t length();
- virtual void flush();
+ size_t length() override;
+ void flush() override;
private:
- virtual void overrun(size_t needed);
+ void overrun(size_t needed) override;
int offset;
uint8_t buf[131072];
@@ -98,16 +98,16 @@ public:
void getStats(double& ratio, unsigned long long& bytes,
unsigned long long& rawEquivalent);
- virtual void initDone() {};
- virtual void resizeFramebuffer();
- virtual void setCursor(int, int, const rfb::Point&, const uint8_t*);
- virtual void setCursorPos(const rfb::Point&);
- virtual void framebufferUpdateStart();
- virtual void framebufferUpdateEnd();
- virtual bool dataRect(const rfb::Rect&, int);
- virtual void setColourMapEntries(int, int, uint16_t*);
- virtual void bell();
- virtual void serverCutText(const char*);
+ void initDone() override {};
+ void resizeFramebuffer() override;
+ void setCursor(int, int, const rfb::Point&, const uint8_t*) override;
+ void setCursorPos(const rfb::Point&) override;
+ void framebufferUpdateStart() override;
+ void framebufferUpdateEnd() override;
+ bool dataRect(const rfb::Rect&, int) override;
+ void setColourMapEntries(int, int, uint16_t*) override;
+ void bell() override;
+ void serverCutText(const char*) override;
public:
double decodeTime;
@@ -136,10 +136,10 @@ public:
void getStats(double&, unsigned long long&, unsigned long long&);
- virtual void setAccessRights(rfb::AccessRights ar);
+ void setAccessRights(rfb::AccessRights ar) override;
- virtual void setDesktopSize(int fb_width, int fb_height,
- const rfb::ScreenSet& layout);
+ void setDesktopSize(int fb_width, int fb_height,
+ const rfb::ScreenSet& layout) override;
protected:
DummyOutStream *out;
diff --git a/tests/perf/fbperf.cxx b/tests/perf/fbperf.cxx
index ba1633b9..357aede2 100644
--- a/tests/perf/fbperf.cxx
+++ b/tests/perf/fbperf.cxx
@@ -43,10 +43,10 @@ public:
virtual void start(int width, int height);
virtual void stop();
- virtual void draw();
+ void draw() override;
protected:
- virtual void flush();
+ void flush() override;
void update();
virtual void changefb();
@@ -63,17 +63,17 @@ protected:
class PartialTestWindow: public TestWindow {
protected:
- virtual void changefb();
+ void changefb() override;
};
class OverlayTestWindow: public PartialTestWindow {
public:
OverlayTestWindow();
- virtual void start(int width, int height);
- virtual void stop();
+ void start(int width, int height) override;
+ void stop() override;
- virtual void draw();
+ void draw() override;
protected:
Surface* overlay;
diff --git a/tests/unit/emulatemb.cxx b/tests/unit/emulatemb.cxx
index 7dfc2541..662eedef 100644
--- a/tests/unit/emulatemb.cxx
+++ b/tests/unit/emulatemb.cxx
@@ -42,7 +42,7 @@ rfb::BoolParameter emulateMiddleButton("dummy_name", "dummy_desc", true);
class TestClass : public EmulateMB
{
public:
- virtual void sendPointerEvent(const rfb::Point& pos, int buttonMask);
+ void sendPointerEvent(const rfb::Point& pos, int buttonMask) override;
struct PointerEventParams {rfb::Point pos; int mask; };
diff --git a/tests/unit/gesturehandler.cxx b/tests/unit/gesturehandler.cxx
index bc39c24c..73b8c62c 100644
--- a/tests/unit/gesturehandler.cxx
+++ b/tests/unit/gesturehandler.cxx
@@ -30,7 +30,7 @@
class TestClass : public GestureHandler
{
protected:
- virtual void handleGestureEvent(const GestureEvent& event);
+ void handleGestureEvent(const GestureEvent& event) override;
public:
std::vector<GestureEvent> events;
diff --git a/unix/tx/TXButton.h b/unix/tx/TXButton.h
index e6be3d68..88964833 100644
--- a/unix/tx/TXButton.h
+++ b/unix/tx/TXButton.h
@@ -92,7 +92,7 @@ private:
XDrawString(dpy, win(), gc, startx, starty, text.data(), text.size());
}
- virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
+ void handleEvent(TXWindow* /*w*/, XEvent* ev) override {
switch (ev->type) {
case Expose:
paint();
diff --git a/unix/tx/TXCheckbox.h b/unix/tx/TXCheckbox.h
index c69455c6..179e3e84 100644
--- a/unix/tx/TXCheckbox.h
+++ b/unix/tx/TXCheckbox.h
@@ -110,7 +110,7 @@ private:
text, strlen(text));
}
- virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
+ void handleEvent(TXWindow* /*w*/, XEvent* ev) override {
switch (ev->type) {
case Expose:
paint();
diff --git a/unix/tx/TXDialog.h b/unix/tx/TXDialog.h
index 3187247d..8804e853 100644
--- a/unix/tx/TXDialog.h
+++ b/unix/tx/TXDialog.h
@@ -82,7 +82,7 @@ public:
}
protected:
- virtual void deleteWindow(TXWindow* /*w*/) {
+ void deleteWindow(TXWindow* /*w*/) override {
ok = false;
done = true;
unmap();
diff --git a/unix/tx/TXLabel.h b/unix/tx/TXLabel.h
index 5af16679..1e0cc0e5 100644
--- a/unix/tx/TXLabel.h
+++ b/unix/tx/TXLabel.h
@@ -108,7 +108,7 @@ private:
} while (i < text.size());
}
- virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
+ void handleEvent(TXWindow* /*w*/, XEvent* ev) override {
switch (ev->type) {
case Expose:
paint();
diff --git a/unix/vncconfig/QueryConnectDialog.h b/unix/vncconfig/QueryConnectDialog.h
index dcf64e40..5763e1ce 100644
--- a/unix/vncconfig/QueryConnectDialog.h
+++ b/unix/vncconfig/QueryConnectDialog.h
@@ -40,10 +40,10 @@ class QueryConnectDialog : public TXDialog, public TXEventHandler,
QueryConnectDialog(Display* dpy, const char* address_,
const char* user_, int timeout_,
QueryResultCallback* cb);
- void handleEvent(TXWindow*, XEvent* ) { }
- void deleteWindow(TXWindow*);
- void buttonActivate(TXButton* b);
- void handleTimeout(rfb::Timer* t);
+ void handleEvent(TXWindow*, XEvent* ) override { }
+ void deleteWindow(TXWindow*) override;
+ void buttonActivate(TXButton* b) override;
+ void handleTimeout(rfb::Timer* t) override;
private:
void refreshTimeout();
TXLabel addressLbl, address, userLbl, user, timeoutLbl, timeout;
diff --git a/unix/vncconfig/vncconfig.cxx b/unix/vncconfig/vncconfig.cxx
index cd4b2ee4..6f1f43dc 100644
--- a/unix/vncconfig/vncconfig.cxx
+++ b/unix/vncconfig/vncconfig.cxx
@@ -110,7 +110,7 @@ public:
// handleEvent()
- virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
+ void handleEvent(TXWindow* /*w*/, XEvent* ev) override {
if (ev->type == vncExtEventBase + VncExtQueryConnectNotify) {
vlog.debug("query connection event");
if (queryConnectDialog)
@@ -134,12 +134,12 @@ public:
}
// TXDeleteWindowCallback method
- virtual void deleteWindow(TXWindow* /*w*/) {
+ void deleteWindow(TXWindow* /*w*/) override {
exit(1);
}
// TXCheckboxCallback method
- virtual void checkboxSelect(TXCheckbox* checkbox) {
+ void checkboxSelect(TXCheckbox* checkbox) override {
if (checkbox == &acceptClipboard) {
XVncExtSetParam(dpy, (acceptClipboard.checked()
? ACCEPT_CUT_TEXT "=1" : ACCEPT_CUT_TEXT "=0"));
@@ -158,10 +158,10 @@ public:
}
// QueryResultCallback interface
- virtual void queryApproved() {
+ void queryApproved() override {
XVncExtApproveConnect(dpy, queryConnectId, 1);
}
- virtual void queryRejected() {
+ void queryRejected() override {
XVncExtApproveConnect(dpy, queryConnectId, 0);
}
diff --git a/unix/x0vncserver/Image.h b/unix/x0vncserver/Image.h
index 9fc03d9a..a89a26ad 100644
--- a/unix/x0vncserver/Image.h
+++ b/unix/x0vncserver/Image.h
@@ -98,16 +98,16 @@ public:
ShmImage(Display *d, int width, int height);
virtual ~ShmImage();
- virtual const char *className() const {
+ const char *className() const override {
return "ShmImage";
}
- virtual const char *classDesc() const {
+ const char *classDesc() const override {
return "shared memory image";
}
- virtual void get(Window wnd, int x = 0, int y = 0);
- virtual void get(Window wnd, int x, int y, int w, int h,
- int dst_x = 0, int dst_y = 0);
+ void get(Window wnd, int x = 0, int y = 0) override;
+ void get(Window wnd, int x, int y, int w, int h,
+ int dst_x = 0, int dst_y = 0) override;
protected:
diff --git a/unix/x0vncserver/XDesktop.h b/unix/x0vncserver/XDesktop.h
index fc230e5b..c707fc6b 100644
--- a/unix/x0vncserver/XDesktop.h
+++ b/unix/x0vncserver/XDesktop.h
@@ -47,25 +47,25 @@ public:
virtual ~XDesktop();
void poll();
// -=- SDesktop interface
- virtual void init(rfb::VNCServer* vs);
- virtual void start();
- virtual void stop();
- virtual void terminate();
+ void init(rfb::VNCServer* vs) override;
+ void start() override;
+ void stop() override;
+ void terminate() override;
bool isRunning();
- virtual void queryConnection(network::Socket* sock,
- const char* userName);
- virtual void pointerEvent(const rfb::Point& pos, int buttonMask);
- virtual void keyEvent(uint32_t keysym, uint32_t xtcode, bool down);
- virtual void clientCutText(const char* str);
- virtual unsigned int setScreenLayout(int fb_width, int fb_height,
- const rfb::ScreenSet& layout);
+ void queryConnection(network::Socket* sock,
+ const char* userName) override;
+ void pointerEvent(const rfb::Point& pos, int buttonMask) override;
+ void keyEvent(uint32_t keysym, uint32_t xtcode, bool down) override;
+ void clientCutText(const char* str) override;
+ unsigned int setScreenLayout(int fb_width, int fb_height,
+ const rfb::ScreenSet& layout) override;
// -=- TXGlobalEventHandler interface
- virtual bool handleGlobalEvent(XEvent* ev);
+ bool handleGlobalEvent(XEvent* ev) override;
// -=- QueryResultCallback interface
- virtual void queryApproved();
- virtual void queryRejected();
+ void queryApproved() override;
+ void queryRejected() override;
protected:
Display* dpy;
diff --git a/unix/x0vncserver/XPixelBuffer.h b/unix/x0vncserver/XPixelBuffer.h
index 18c85fe2..7556e6ef 100644
--- a/unix/x0vncserver/XPixelBuffer.h
+++ b/unix/x0vncserver/XPixelBuffer.h
@@ -45,7 +45,7 @@ public:
inline void poll(rfb::VNCServer *server) { m_poller->poll(server); }
// Override PixelBuffer::grabRegion().
- virtual void grabRegion(const rfb::Region& region);
+ void grabRegion(const rfb::Region& region) override;
protected:
PollingManager *m_poller;
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index 88c67b0b..aa205d41 100644
--- a/unix/x0vncserver/x0vncserver.cxx
+++ b/unix/x0vncserver/x0vncserver.cxx
@@ -166,7 +166,7 @@ public:
free(fileName);
}
- virtual bool verifyConnection(Socket* s)
+ bool verifyConnection(Socket* s) override
{
if (!reloadRules()) {
vlog.error("Could not read IP filtering rules: rejecting all clients");
diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h
index e604295b..3b0f869f 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.h
+++ b/unix/xserver/hw/vnc/XserverDesktop.h
@@ -91,21 +91,21 @@ public:
const char* rejectMsg=0);
// rfb::SDesktop callbacks
- virtual void init(rfb::VNCServer* vs);
- virtual void terminate();
- virtual void queryConnection(network::Socket* sock,
- const char* userName);
- virtual void pointerEvent(const rfb::Point& pos, int buttonMask);
- virtual void keyEvent(uint32_t keysym, uint32_t keycode, bool down);
- virtual unsigned int setScreenLayout(int fb_width, int fb_height,
- const rfb::ScreenSet& layout);
- virtual void frameTick(uint64_t msc);
- virtual void handleClipboardRequest();
- virtual void handleClipboardAnnounce(bool available);
- virtual void handleClipboardData(const char* data);
+ void init(rfb::VNCServer* vs) override;
+ void terminate() override;
+ void queryConnection(network::Socket* sock,
+ const char* userName) override;
+ void pointerEvent(const rfb::Point& pos, int buttonMask) override;
+ void keyEvent(uint32_t keysym, uint32_t keycode, bool down) override;
+ unsigned int setScreenLayout(int fb_width, int fb_height,
+ const rfb::ScreenSet& layout) override;
+ void frameTick(uint64_t msc) override;
+ void handleClipboardRequest() override;
+ void handleClipboardAnnounce(bool available) override;
+ void handleClipboardData(const char* data) override;
// rfb::PixelBuffer callbacks
- virtual void grabRegion(const rfb::Region& r);
+ void grabRegion(const rfb::Region& r) override;
protected:
bool handleListenerEvent(int fd,
@@ -115,7 +115,7 @@ protected:
rfb::VNCServer* sockserv,
bool read, bool write);
- virtual void handleTimeout(rfb::Timer* t);
+ void handleTimeout(rfb::Timer* t) override;
private:
diff --git a/vncviewer/CConn.h b/vncviewer/CConn.h
index 835699e5..fcaf49f6 100644
--- a/vncviewer/CConn.h
+++ b/vncviewer/CConn.h
@@ -45,37 +45,40 @@ public:
static void socketEvent(FL_SOCKET fd, void *data);
// CConnection callback methods
- void initDone();
+ void initDone() override;
- void setDesktopSize(int w, int h);
+ void setDesktopSize(int w, int h) override;
void setExtendedDesktopSize(unsigned reason, unsigned result,
- int w, int h, const rfb::ScreenSet& layout);
+ int w, int h,
+ const rfb::ScreenSet& layout) override;
- void setName(const char* name);
+ void setName(const char* name) override;
- void setColourMapEntries(int firstColour, int nColours, uint16_t* rgbs);
+ void setColourMapEntries(int firstColour, int nColours,
+ uint16_t* rgbs) override;
- void bell();
+ void bell() override;
- void framebufferUpdateStart();
- void framebufferUpdateEnd();
- bool dataRect(const rfb::Rect& r, int encoding);
+ void framebufferUpdateStart() override;
+ void framebufferUpdateEnd() override;
+ bool dataRect(const rfb::Rect& r, int encoding) override;
void setCursor(int width, int height, const rfb::Point& hotspot,
- const uint8_t* data);
- void setCursorPos(const rfb::Point& pos);
+ const uint8_t* data) override;
+ void setCursorPos(const rfb::Point& pos) override;
- void fence(uint32_t flags, unsigned len, const uint8_t data[]);
+ void fence(uint32_t flags, unsigned len,
+ const uint8_t data[]) override;
- void setLEDState(unsigned int state);
+ void setLEDState(unsigned int state) override;
- virtual void handleClipboardRequest();
- virtual void handleClipboardAnnounce(bool available);
- virtual void handleClipboardData(const char* data);
+ void handleClipboardRequest() override;
+ void handleClipboardAnnounce(bool available) override;
+ void handleClipboardData(const char* data) override;
private:
- void resizeFramebuffer();
+ void resizeFramebuffer() override;
void autoSelectFormatAndEncoding();
void updatePixelFormat();
diff --git a/vncviewer/DesktopWindow.h b/vncviewer/DesktopWindow.h
index fd622c6d..ce7960ce 100644
--- a/vncviewer/DesktopWindow.h
+++ b/vncviewer/DesktopWindow.h
@@ -71,11 +71,11 @@ public:
void handleClipboardData(const char* data);
// Fl_Window callback methods
- virtual void show();
- virtual void draw();
- virtual void resize(int x, int y, int w, int h);
+ void show() override;
+ void draw() override;
+ void resize(int x, int y, int w, int h) override;
- virtual int handle(int event);
+ int handle(int event) override;
void fullscreen_on();
diff --git a/vncviewer/EmulateMB.h b/vncviewer/EmulateMB.h
index 77fdec66..caf3c32a 100644
--- a/vncviewer/EmulateMB.h
+++ b/vncviewer/EmulateMB.h
@@ -31,7 +31,7 @@ public:
protected:
virtual void sendPointerEvent(const rfb::Point& pos, int buttonMask)=0;
- virtual void handleTimeout(rfb::Timer *t);
+ void handleTimeout(rfb::Timer *t) override;
private:
void sendAction(const rfb::Point& pos, int buttonMask, int action);
diff --git a/vncviewer/GestureHandler.h b/vncviewer/GestureHandler.h
index b07454df..df30ebc2 100644
--- a/vncviewer/GestureHandler.h
+++ b/vncviewer/GestureHandler.h
@@ -42,7 +42,7 @@ class GestureHandler : public rfb::Timer::Callback {
private:
bool hasDetectedGesture();
- virtual void handleTimeout(rfb::Timer* t);
+ void handleTimeout(rfb::Timer* t) override;
void longpressTimeout();
void twoTouchTimeout();
diff --git a/vncviewer/MonitorIndicesParameter.h b/vncviewer/MonitorIndicesParameter.h
index 58e55e43..80512c32 100644
--- a/vncviewer/MonitorIndicesParameter.h
+++ b/vncviewer/MonitorIndicesParameter.h
@@ -29,7 +29,7 @@ public:
MonitorIndicesParameter(const char* name_, const char* desc_, const char* v);
std::set<int> getParam();
bool setParam(std::set<int> indices);
- bool setParam(const char* value);
+ bool setParam(const char* value) override;
private:
typedef struct {
int x, y, w, h;
diff --git a/vncviewer/OptionsDialog.h b/vncviewer/OptionsDialog.h
index 0129037d..f6ca89b1 100644
--- a/vncviewer/OptionsDialog.h
+++ b/vncviewer/OptionsDialog.h
@@ -45,7 +45,7 @@ public:
static void addCallback(OptionsCallback *cb, void *data = nullptr);
static void removeCallback(OptionsCallback *cb);
- void show(void);
+ void show(void) override;
protected:
void loadOptions(void);
diff --git a/vncviewer/PlatformPixelBuffer.h b/vncviewer/PlatformPixelBuffer.h
index ec439f64..24763d46 100644
--- a/vncviewer/PlatformPixelBuffer.h
+++ b/vncviewer/PlatformPixelBuffer.h
@@ -40,7 +40,7 @@ public:
PlatformPixelBuffer(int width, int height);
~PlatformPixelBuffer();
- virtual void commitBufferRW(const rfb::Rect& r);
+ void commitBufferRW(const rfb::Rect& r) override;
rfb::Rect getDamage(void);
diff --git a/vncviewer/UserDialog.h b/vncviewer/UserDialog.h
index 913af841..db4e7c45 100644
--- a/vncviewer/UserDialog.h
+++ b/vncviewer/UserDialog.h
@@ -32,11 +32,11 @@ public:
// UserPasswdGetter callbacks
void getUserPasswd(bool secure, std::string* user,
- std::string* password);
+ std::string* password) override;
// UserMsgBox callbacks
- bool showMsgBox(int flags, const char* title, const char* text);
+ bool showMsgBox(int flags, const char* title, const char* text) override;
};
#endif
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h
index 4b674aa1..d936c708 100644
--- a/vncviewer/Viewport.h
+++ b/vncviewer/Viewport.h
@@ -63,14 +63,14 @@ public:
// Fl_Widget callback methods
- void draw();
+ void draw() override;
- void resize(int x, int y, int w, int h);
+ void resize(int x, int y, int w, int h) override;
- int handle(int event);
+ int handle(int event) override;
protected:
- virtual void sendPointerEvent(const rfb::Point& pos, int buttonMask);
+ void sendPointerEvent(const rfb::Point& pos, int buttonMask) override;
private:
bool hasFocus();
diff --git a/vncviewer/Win32TouchHandler.h b/vncviewer/Win32TouchHandler.h
index 05039c88..a0554ccd 100644
--- a/vncviewer/Win32TouchHandler.h
+++ b/vncviewer/Win32TouchHandler.h
@@ -35,11 +35,11 @@ class Win32TouchHandler: public BaseTouchHandler {
bool isSinglePan(GESTUREINFO gi);
protected:
- virtual void fakeMotionEvent(const GestureEvent origEvent);
- virtual void fakeButtonEvent(bool press, int button,
- const GestureEvent origEvent);
- virtual void fakeKeyEvent(bool press, int keycode,
- const GestureEvent origEvent);
+ void fakeMotionEvent(const GestureEvent origEvent) override;
+ void fakeButtonEvent(bool press, int button,
+ const GestureEvent origEvent) override;
+ void fakeKeyEvent(bool press, int keycode,
+ const GestureEvent origEvent) override;
private:
void pushFakeEvent(UINT Msg, WPARAM wParam, LPARAM lParam);
diff --git a/vncviewer/XInputTouchHandler.h b/vncviewer/XInputTouchHandler.h
index 6360b974..897c55ae 100644
--- a/vncviewer/XInputTouchHandler.h
+++ b/vncviewer/XInputTouchHandler.h
@@ -39,13 +39,13 @@ class XInputTouchHandler: public BaseTouchHandler, GestureHandler {
const XIDeviceEvent* origEvent);
void preparePointerEvent(XEvent* dst, const GestureEvent src);
- virtual void fakeMotionEvent(const GestureEvent origEvent);
- virtual void fakeButtonEvent(bool press, int button,
- const GestureEvent origEvent);
- virtual void fakeKeyEvent(bool press, int keycode,
- const GestureEvent origEvent);
+ void fakeMotionEvent(const GestureEvent origEvent) override;
+ void fakeButtonEvent(bool press, int button,
+ const GestureEvent origEvent) override;
+ void fakeKeyEvent(bool press, int keycode,
+ const GestureEvent origEvent) override;
- virtual void handleGestureEvent(const GestureEvent& event);
+ void handleGestureEvent(const GestureEvent& event) override;
private:
void pushFakeEvent(XEvent* event);
diff --git a/vncviewer/fltk/Fl_Monitor_Arrangement.h b/vncviewer/fltk/Fl_Monitor_Arrangement.h
index c71dd199..d8bf582b 100644
--- a/vncviewer/fltk/Fl_Monitor_Arrangement.h
+++ b/vncviewer/fltk/Fl_Monitor_Arrangement.h
@@ -45,7 +45,7 @@ public:
int value(std::set<int> indices);
protected:
- virtual void draw();
+ void draw() override;
private:
const Fl_Color AVAILABLE_COLOR;
diff --git a/vncviewer/fltk/Fl_Navigation.h b/vncviewer/fltk/Fl_Navigation.h
index 7f5e44ac..44515691 100644
--- a/vncviewer/fltk/Fl_Navigation.h
+++ b/vncviewer/fltk/Fl_Navigation.h
@@ -38,7 +38,7 @@ public:
void client_area(int &rx, int &ry, int &rw, int &rh, int lw);
- virtual void draw();
+ void draw() override;
// Delegation to underlying widget
void begin();
diff --git a/win/rfb_win32/AboutDialog.h b/win/rfb_win32/AboutDialog.h
index 705d6b3c..00cf0d42 100644
--- a/win/rfb_win32/AboutDialog.h
+++ b/win/rfb_win32/AboutDialog.h
@@ -33,7 +33,7 @@ namespace rfb {
public:
AboutDialog();
virtual bool showDialog();
- virtual void initDialog();
+ void initDialog() override;
static AboutDialog instance;
diff --git a/win/rfb_win32/Clipboard.h b/win/rfb_win32/Clipboard.h
index 588f1086..b66aa5a4 100644
--- a/win/rfb_win32/Clipboard.h
+++ b/win/rfb_win32/Clipboard.h
@@ -57,7 +57,7 @@ namespace rfb {
protected:
// - Internal MsgWindow callback
- virtual LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam);
+ LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam) override;
Notifier* notifier;
HWND next_window;
diff --git a/win/rfb_win32/DeviceFrameBuffer.h b/win/rfb_win32/DeviceFrameBuffer.h
index c8715724..e9f06cb0 100644
--- a/win/rfb_win32/DeviceFrameBuffer.h
+++ b/win/rfb_win32/DeviceFrameBuffer.h
@@ -69,7 +69,7 @@ namespace rfb {
// - FrameBuffer overrides
virtual void grabRect(const Rect &rect);
- virtual void grabRegion(const Region &region);
+ void grabRegion(const Region &region) override;
// - DeviceFrameBuffer specific methods
diff --git a/win/rfb_win32/Dialog.h b/win/rfb_win32/Dialog.h
index 4661dd31..69374bb1 100644
--- a/win/rfb_win32/Dialog.h
+++ b/win/rfb_win32/Dialog.h
@@ -148,7 +148,7 @@ namespace rfb {
protected:
void setPropSheet(PropSheet* ps) {propSheet = ps;};
static INT_PTR CALLBACK staticPageProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
- virtual BOOL dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ BOOL dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) override;
PROPSHEETPAGE page;
PropSheet* propSheet;
};
diff --git a/win/rfb_win32/RegConfig.h b/win/rfb_win32/RegConfig.h
index ef8e45bd..401cb148 100644
--- a/win/rfb_win32/RegConfig.h
+++ b/win/rfb_win32/RegConfig.h
@@ -56,7 +56,7 @@ namespace rfb {
static void loadRegistryConfig(RegKey& key);
protected:
// EventHandler interface and trigger event
- virtual void processEvent(HANDLE event);
+ void processEvent(HANDLE event) override;
EventManager* eventMgr;
Handle event;
@@ -72,7 +72,7 @@ namespace rfb {
// Start the thread, reading from the specified key
bool start(const HKEY rootkey, const char* keyname);
protected:
- virtual void worker();
+ void worker() override;
EventManager eventMgr;
RegConfig config;
DWORD thread_id;
diff --git a/win/rfb_win32/SDisplay.h b/win/rfb_win32/SDisplay.h
index 5b55cd66..76780d9e 100644
--- a/win/rfb_win32/SDisplay.h
+++ b/win/rfb_win32/SDisplay.h
@@ -71,31 +71,31 @@ namespace rfb {
// -=- SDesktop interface
- virtual void init(VNCServer* vs);
- virtual void start();
- virtual void stop();
- virtual void terminate();
- virtual void queryConnection(network::Socket* sock,
- const char* userName);
- virtual void handleClipboardRequest();
- virtual void handleClipboardAnnounce(bool available);
- virtual void handleClipboardData(const char* data);
- virtual void pointerEvent(const Point& pos, int buttonmask);
- virtual void keyEvent(uint32_t keysym, uint32_t keycode, bool down);
+ void init(VNCServer* vs) override;
+ void start() override;
+ void stop() override;
+ void terminate() override;
+ void queryConnection(network::Socket* sock,
+ const char* userName) override;
+ void handleClipboardRequest() override;
+ void handleClipboardAnnounce(bool available) override;
+ void handleClipboardData(const char* data) override;
+ void pointerEvent(const Point& pos, int buttonmask) override;
+ void keyEvent(uint32_t keysym, uint32_t keycode, bool down) override;
// -=- Clipboard events
- virtual void notifyClipboardChanged(bool available);
+ void notifyClipboardChanged(bool available) override;
// -=- Display events
- virtual void notifyDisplayEvent(WMMonitor::Notifier::DisplayEventType evt);
+ void notifyDisplayEvent(WMMonitor::Notifier::DisplayEventType evt) override;
// -=- EventHandler interface
HANDLE getUpdateEvent() {return updateEvent;}
HANDLE getTerminateEvent() {return terminateEvent;}
- virtual void processEvent(HANDLE event);
+ void processEvent(HANDLE event) override;
// -=- Notification of whether or not SDisplay is started
diff --git a/win/rfb_win32/SDisplayCorePolling.h b/win/rfb_win32/SDisplayCorePolling.h
index 9a8bc29b..00de2d40 100644
--- a/win/rfb_win32/SDisplayCorePolling.h
+++ b/win/rfb_win32/SDisplayCorePolling.h
@@ -40,17 +40,17 @@ namespace rfb {
~SDisplayCorePolling();
// - Called by SDisplay to inform Core of the screen size
- virtual void setScreenRect(const Rect& screenRect_);
+ void setScreenRect(const Rect& screenRect_) override;
// - Called by SDisplay to flush updates to the specified tracker
- virtual void flushUpdates();
+ void flushUpdates() override;
- virtual const char* methodName() const { return "Polling"; }
+ const char* methodName() const override { return "Polling"; }
protected:
// - MsgWindow overrides
// processMessage is used to service the cursor & polling timers
- virtual LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam);
+ LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam) override;
// - Hooking subcomponents used to track the desktop state
WMCopyRect copyrect;
diff --git a/win/rfb_win32/SDisplayCoreWMHooks.h b/win/rfb_win32/SDisplayCoreWMHooks.h
index 82557f13..3358a1ee 100644
--- a/win/rfb_win32/SDisplayCoreWMHooks.h
+++ b/win/rfb_win32/SDisplayCoreWMHooks.h
@@ -43,14 +43,14 @@ namespace rfb {
~SDisplayCoreWMHooks();
// - Called by SDisplay to flush updates to the specified tracker
- virtual void flushUpdates();
+ void flushUpdates() override;
- virtual const char* methodName() const { return "VNC Hooks"; }
+ const char* methodName() const override { return "VNC Hooks"; }
protected:
// - MsgWindow overrides
// processMessage is used to service the cursor & polling timers
- virtual LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam);
+ LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam) override;
// - Hooking subcomponents used to track the desktop state
WMHooks hooks;
diff --git a/win/rfb_win32/SecurityPage.h b/win/rfb_win32/SecurityPage.h
index 258b58e0..62c50388 100644
--- a/win/rfb_win32/SecurityPage.h
+++ b/win/rfb_win32/SecurityPage.h
@@ -39,9 +39,9 @@ public:
virtual void disableX509Dialogs(void) = 0;
virtual void loadVncPasswd(void) = 0;
- virtual void initDialog();
- virtual bool onCommand(int id, int cmd);
- virtual bool onOk();
+ void initDialog() override;
+ bool onCommand(int id, int cmd) override;
+ bool onOk() override;
protected:
Security *security;
diff --git a/win/rfb_win32/Service.cxx b/win/rfb_win32/Service.cxx
index a27cfa67..0d6cd578 100644
--- a/win/rfb_win32/Service.cxx
+++ b/win/rfb_win32/Service.cxx
@@ -274,7 +274,7 @@ public:
DeregisterEventSource(eventlog);
}
- virtual void write(int level, const char *logname, const char *message) {
+ void write(int level, const char *logname, const char *message) override {
if (!eventlog) return;
const char* strings[] = {logname, message};
WORD type = EVENTLOG_INFORMATION_TYPE;
diff --git a/win/rfb_win32/SocketManager.h b/win/rfb_win32/SocketManager.h
index b3df2f4b..4302bbbe 100644
--- a/win/rfb_win32/SocketManager.h
+++ b/win/rfb_win32/SocketManager.h
@@ -75,8 +75,8 @@ namespace rfb {
void setDisable(VNCServer* srvr, bool disable);
protected:
- virtual int checkTimeouts();
- virtual void processEvent(HANDLE event);
+ int checkTimeouts() override;
+ void processEvent(HANDLE event) override;
virtual void remSocket(network::Socket* sock);
struct ConnInfo {
diff --git a/win/rfb_win32/WMHooks.cxx b/win/rfb_win32/WMHooks.cxx
index 62fc49f6..cb2e0275 100644
--- a/win/rfb_win32/WMHooks.cxx
+++ b/win/rfb_win32/WMHooks.cxx
@@ -120,7 +120,7 @@ public:
void stop();
DWORD getThreadId() { return thread_id; }
protected:
- virtual void worker();
+ void worker() override;
protected:
bool active;
DWORD thread_id;
diff --git a/win/rfb_win32/WMNotifier.h b/win/rfb_win32/WMNotifier.h
index 3855430b..937a655d 100644
--- a/win/rfb_win32/WMNotifier.h
+++ b/win/rfb_win32/WMNotifier.h
@@ -55,7 +55,7 @@ namespace rfb {
protected:
// - Internal MsgWindow callback
- virtual LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam);
+ LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam) override;
Notifier* notifier;
};
diff --git a/win/vncconfig/Authentication.h b/win/vncconfig/Authentication.h
index 79d5dfa4..1123678f 100644
--- a/win/vncconfig/Authentication.h
+++ b/win/vncconfig/Authentication.h
@@ -47,7 +47,7 @@ namespace rfb {
security = new SecurityServer();
}
- void initDialog() {
+ void initDialog() override {
SecurityPage::initDialog();
setItemChecked(IDC_QUERY_CONNECT, rfb::Server::queryConnect);
@@ -55,7 +55,7 @@ namespace rfb {
onCommand(IDC_AUTH_NONE, 0);
}
- bool onCommand(int id, int cmd) {
+ bool onCommand(int id, int cmd) override {
SecurityPage::onCommand(id, cmd);
setChanged(true);
@@ -78,7 +78,7 @@ namespace rfb {
return true;
}
- bool onOk() {
+ bool onOk() override {
SecurityPage::onOk();
if (isItemChecked(IDC_AUTH_VNC))
@@ -126,16 +126,16 @@ namespace rfb {
}
}
- virtual void loadX509Certs(void) {}
- virtual void enableX509Dialogs(void) {
+ void loadX509Certs(void) override {}
+ void enableX509Dialogs(void) override {
enableItem(IDC_LOAD_CERT, true);
enableItem(IDC_LOAD_CERTKEY, true);
}
- virtual void disableX509Dialogs(void) {
+ void disableX509Dialogs(void) override {
enableItem(IDC_LOAD_CERT, false);
enableItem(IDC_LOAD_CERTKEY, false);
}
- virtual void loadVncPasswd() {
+ void loadVncPasswd() override {
enableItem(IDC_AUTH_VNC_PASSWD, isItemChecked(IDC_AUTH_VNC));
}
diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h
index 9ff6f6a4..a540bd76 100644
--- a/win/vncconfig/Connections.h
+++ b/win/vncconfig/Connections.h
@@ -46,7 +46,7 @@ namespace rfb {
pattern = pat;
return Dialog::showDialog(MAKEINTRESOURCE(IDD_CONN_HOST));
}
- void initDialog() {
+ void initDialog() override {
if (pattern.empty())
pattern = "+";
@@ -60,7 +60,7 @@ namespace rfb {
setItemString(IDC_HOST_PATTERN, &pattern.c_str()[1]);
pattern.clear();
}
- bool onOk() {
+ bool onOk() override {
std::string newPat;
if (isItemChecked(IDC_ALLOW))
newPat = '+';
@@ -88,7 +88,7 @@ namespace rfb {
public:
ConnectionsPage(const RegKey& rk)
: PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_CONNECTIONS)), regKey(rk) {}
- void initDialog() {
+ void initDialog() override {
vlog.debug("set IDC_PORT %d", (int)port_number);
setItemInt(IDC_PORT, port_number ? port_number : 5900);
setItemChecked(IDC_RFB_ENABLE, port_number != 0);
@@ -108,7 +108,7 @@ namespace rfb {
onCommand(IDC_RFB_ENABLE, EN_CHANGE);
}
- bool onCommand(int id, int cmd) {
+ bool onCommand(int id, int cmd) override {
switch (id) {
case IDC_HOSTS:
{
@@ -221,7 +221,7 @@ namespace rfb {
}
return false;
}
- bool onOk() {
+ bool onOk() override {
regKey.setInt("PortNumber", isItemChecked(IDC_RFB_ENABLE) ? getItemInt(IDC_PORT) : 0);
regKey.setInt("IdleTimeout", getItemInt(IDC_IDLE_TIMEOUT));
regKey.setInt("LocalHost", isItemChecked(IDC_LOCALHOST));
diff --git a/win/vncconfig/Desktop.h b/win/vncconfig/Desktop.h
index c927d5ac..a5058389 100644
--- a/win/vncconfig/Desktop.h
+++ b/win/vncconfig/Desktop.h
@@ -30,7 +30,7 @@ namespace rfb {
public:
DesktopPage(const RegKey& rk)
: PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_DESKTOP)), regKey(rk) {}
- void initDialog() {
+ void initDialog() override {
const char *action(rfb::win32::SDisplay::disconnectAction);
bool disconnectLock = stricmp(action, "Lock") == 0;
bool disconnectLogoff = stricmp(action, "Logoff") == 0;
@@ -40,7 +40,7 @@ namespace rfb {
setItemChecked(IDC_REMOVE_WALLPAPER, rfb::win32::SDisplay::removeWallpaper);
setItemChecked(IDC_DISABLE_EFFECTS, rfb::win32::SDisplay::disableEffects);
}
- bool onCommand(int id, int /*cmd*/) {
+ bool onCommand(int id, int /*cmd*/) override {
switch (id) {
case IDC_DISCONNECT_LOGOFF:
case IDC_DISCONNECT_LOCK:
@@ -58,7 +58,7 @@ namespace rfb {
}
return false;
}
- bool onOk() {
+ bool onOk() override {
const char* action = "None";
if (isItemChecked(IDC_DISCONNECT_LOGOFF))
action = "Logoff";
diff --git a/win/vncconfig/Hooking.h b/win/vncconfig/Hooking.h
index d3cf8620..9f84230d 100644
--- a/win/vncconfig/Hooking.h
+++ b/win/vncconfig/Hooking.h
@@ -32,14 +32,14 @@ namespace rfb {
public:
HookingPage(const RegKey& rk)
: PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_HOOKING)), regKey(rk) {}
- void initDialog() {
+ void initDialog() override {
setItemChecked(IDC_USEPOLLING, rfb::win32::SDisplay::updateMethod == 0);
setItemChecked(IDC_USEHOOKS, (rfb::win32::SDisplay::updateMethod == 1));
setItemChecked(IDC_POLLCONSOLES, rfb::win32::WMPoller::poll_console_windows);
setItemChecked(IDC_CAPTUREBLT, rfb::win32::DeviceFrameBuffer::useCaptureBlt);
onCommand(IDC_USEHOOKS, 0);
}
- bool onCommand(int id, int /*cmd*/) {
+ bool onCommand(int id, int /*cmd*/) override {
switch (id) {
case IDC_USEPOLLING:
case IDC_USEHOOKS:
@@ -54,7 +54,7 @@ namespace rfb {
}
return false;
}
- bool onOk() {
+ bool onOk() override {
if (isItemChecked(IDC_USEPOLLING))
regKey.setInt("UpdateMethod", 0);
if (isItemChecked(IDC_USEHOOKS))
diff --git a/win/vncconfig/Inputs.h b/win/vncconfig/Inputs.h
index 671520ba..2ffdda03 100644
--- a/win/vncconfig/Inputs.h
+++ b/win/vncconfig/Inputs.h
@@ -35,7 +35,7 @@ namespace rfb {
InputsPage(const RegKey& rk)
: PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_INPUTS)),
regKey(rk), enableAffectSSaver(true) {}
- void initDialog() {
+ void initDialog() override {
setItemChecked(IDC_ACCEPT_KEYS, rfb::Server::acceptKeyEvents);
setItemChecked(IDC_RAW_KEYBOARD, SKeyboard::rawKeyboard);
setItemChecked(IDC_ACCEPT_PTR, rfb::Server::acceptPointerEvents);
@@ -49,7 +49,7 @@ namespace rfb {
enableAffectSSaver = false;
enableItem(IDC_AFFECT_SCREENSAVER, enableAffectSSaver);
}
- bool onCommand(int /*id*/, int /*cmd*/) {
+ bool onCommand(int /*id*/, int /*cmd*/) override {
BOOL inputResetsBlocked;
SystemParametersInfo(SPI_GETBLOCKSENDINPUTRESETS, 0, &inputResetsBlocked, 0);
setChanged((rfb::Server::acceptKeyEvents != isItemChecked(IDC_ACCEPT_KEYS)) ||
@@ -61,7 +61,7 @@ namespace rfb {
(enableAffectSSaver && (!inputResetsBlocked != isItemChecked(IDC_AFFECT_SCREENSAVER))));
return false;
}
- bool onOk() {
+ bool onOk() override {
regKey.setBool("AcceptKeyEvents", isItemChecked(IDC_ACCEPT_KEYS));
regKey.setBool("RawKeyboard", isItemChecked(IDC_RAW_KEYBOARD));
regKey.setBool("AcceptPointerEvents", isItemChecked(IDC_ACCEPT_PTR));
diff --git a/win/vncconfig/Legacy.h b/win/vncconfig/Legacy.h
index 9232a24d..47bec7d6 100644
--- a/win/vncconfig/Legacy.h
+++ b/win/vncconfig/Legacy.h
@@ -36,10 +36,10 @@ namespace rfb {
public:
LegacyPage(const RegKey& rk, bool userSettings_)
: PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_LEGACY)), regKey(rk), userSettings(userSettings_) {}
- void initDialog() {
+ void initDialog() override {
setItemChecked(IDC_PROTOCOL_3_3, rfb::Server::protocol3_3);
}
- bool onCommand(int id, int /*cmd*/) {
+ bool onCommand(int id, int /*cmd*/) override {
switch (id) {
case IDC_LEGACY_IMPORT:
{
@@ -64,7 +64,7 @@ namespace rfb {
};
return false;
}
- bool onOk() {
+ bool onOk() override {
regKey.setBool("Protocol3.3", isItemChecked(IDC_PROTOCOL_3_3));
return true;
}
diff --git a/win/vncconfig/PasswordDialog.h b/win/vncconfig/PasswordDialog.h
index 5b9d3fb3..06973bb9 100644
--- a/win/vncconfig/PasswordDialog.h
+++ b/win/vncconfig/PasswordDialog.h
@@ -28,7 +28,7 @@ namespace rfb {
public:
PasswordDialog(const RegKey& rk, bool registryInsecure_);
bool showDialog(HWND owner=nullptr);
- bool onOk();
+ bool onOk() override;
protected:
const RegKey& regKey;
bool registryInsecure;
diff --git a/win/vncconfig/Sharing.h b/win/vncconfig/Sharing.h
index 73966c9d..a6459e5f 100644
--- a/win/vncconfig/Sharing.h
+++ b/win/vncconfig/Sharing.h
@@ -30,19 +30,19 @@ namespace rfb {
public:
SharingPage(const RegKey& rk)
: PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_SHARING)), regKey(rk) {}
- void initDialog() {
+ void initDialog() override {
setItemChecked(IDC_DISCONNECT_CLIENTS, rfb::Server::disconnectClients);
setItemChecked(IDC_SHARE_NEVER, rfb::Server::neverShared);
setItemChecked(IDC_SHARE_ALWAYS, rfb::Server::alwaysShared);
setItemChecked(IDC_SHARE_CLIENT, !(rfb::Server::neverShared || rfb::Server::alwaysShared));
}
- bool onCommand(int /*id*/, int /*cmd*/) {
+ bool onCommand(int /*id*/, int /*cmd*/) override {
setChanged((isItemChecked(IDC_DISCONNECT_CLIENTS) != rfb::Server::disconnectClients) ||
(isItemChecked(IDC_SHARE_NEVER) != rfb::Server::neverShared) ||
(isItemChecked(IDC_SHARE_ALWAYS) != rfb::Server::alwaysShared));
return true;
}
- bool onOk() {
+ bool onOk() override {
regKey.setBool("DisconnectClients", isItemChecked(IDC_DISCONNECT_CLIENTS));
regKey.setBool("AlwaysShared", isItemChecked(IDC_SHARE_ALWAYS));
regKey.setBool("NeverShared", isItemChecked(IDC_SHARE_NEVER));
diff --git a/win/winvnc/AddNewClientDialog.h b/win/winvnc/AddNewClientDialog.h
index 1c24d23b..ad34ec23 100644
--- a/win/winvnc/AddNewClientDialog.h
+++ b/win/winvnc/AddNewClientDialog.h
@@ -38,11 +38,11 @@ namespace winvnc {
protected:
// Dialog methods (protected)
- virtual void initDialog() {
+ void initDialog() override {
if (!hostName.empty())
setItemString(IDC_HOST, hostName.c_str());
}
- virtual bool onOk() {
+ bool onOk() override {
hostName = getItemString(IDC_HOST);
return true;
}
diff --git a/win/winvnc/ControlPanel.h b/win/winvnc/ControlPanel.h
index 5d0c5069..23aff0a5 100644
--- a/win/winvnc/ControlPanel.h
+++ b/win/winvnc/ControlPanel.h
@@ -25,7 +25,7 @@ namespace winvnc {
stop_updating = false;
};
virtual bool showDialog();
- virtual void initDialog();
+ void initDialog() override;
virtual bool onCommand(int cmd);
void UpdateListView(ListConnInfo* LCInfo);
HWND GetHandle() {return handle;};
@@ -33,7 +33,7 @@ namespace winvnc {
~ControlPanel();
ListConnInfo ListConnStatus;
protected:
- virtual BOOL dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ BOOL dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) override;
void getSelConnInfo();
HWND m_hSTIcon;
ListConnInfo ListConn;
diff --git a/win/winvnc/QueryConnectDialog.h b/win/winvnc/QueryConnectDialog.h
index 36e885f9..332e7439 100644
--- a/win/winvnc/QueryConnectDialog.h
+++ b/win/winvnc/QueryConnectDialog.h
@@ -39,11 +39,11 @@ namespace winvnc {
bool isAccepted() const {return approve;}
protected:
// Thread methods
- virtual void worker();
+ void worker() override;
// Dialog methods (protected)
- virtual void initDialog();
- virtual BOOL dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ void initDialog() override;
+ BOOL dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) override;
// Custom internal methods
void setCountdownLabel();
diff --git a/win/winvnc/STrayIcon.cxx b/win/winvnc/STrayIcon.cxx
index e23ca772..d703f47a 100644
--- a/win/winvnc/STrayIcon.cxx
+++ b/win/winvnc/STrayIcon.cxx
@@ -86,7 +86,7 @@ public:
CPanel = new ControlPanel(getHandle());
}
- virtual LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam) {
+ LRESULT processMessage(UINT msg, WPARAM wParam, LPARAM lParam) override {
switch(msg) {
case WM_USER:
diff --git a/win/winvnc/STrayIcon.h b/win/winvnc/STrayIcon.h
index 511c3ae2..1aa7bfbc 100644
--- a/win/winvnc/STrayIcon.h
+++ b/win/winvnc/STrayIcon.h
@@ -42,7 +42,7 @@ namespace winvnc {
friend class STrayIcon;
protected:
- virtual void worker();
+ void worker() override;
os::Mutex* lock;
DWORD thread_id;
diff --git a/win/winvnc/VNCServerService.h b/win/winvnc/VNCServerService.h
index cae44868..3992bc91 100644
--- a/win/winvnc/VNCServerService.h
+++ b/win/winvnc/VNCServerService.h
@@ -28,8 +28,8 @@ namespace winvnc {
public:
VNCServerService();
- DWORD serviceMain(int argc, char* argv[]);
- void stop();
+ DWORD serviceMain(int argc, char* argv[]) override;
+ void stop() override;
static const char* Name;
protected:
diff --git a/win/winvnc/VNCServerWin32.h b/win/winvnc/VNCServerWin32.h
index 0fff0963..493b3fa6 100644
--- a/win/winvnc/VNCServerWin32.h
+++ b/win/winvnc/VNCServerWin32.h
@@ -81,20 +81,20 @@ namespace winvnc {
// QueryConnectionHandler interface
// Callback used to prompt user to accept or reject a connection.
// CALLBACK IN VNCServerST "HOST" THREAD
- virtual void queryConnection(network::Socket* sock,
- const char* userName);
+ void queryConnection(network::Socket* sock,
+ const char* userName) override;
// SocketManager::AddressChangeNotifier interface
// Used to keep tray icon up to date
- virtual void processAddressChange();
+ void processAddressChange() override;
// RegConfig::Callback interface
// Called via the EventManager whenever RegConfig sees the registry change
- virtual void regConfigChanged();
+ void regConfigChanged() override;
// EventHandler interface
// Used to perform queued commands
- virtual void processEvent(HANDLE event);
+ void processEvent(HANDLE event) override;
void getConnInfo(ListConnInfo * listConn);
void setConnStatus(ListConnInfo* listConn);