mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-02 14:28:32 +00:00
clang-tidy: use override and remove virtual
Found with modernize-use-override
This can be useful as compilers can generate a compile time error when:
The base class implementation function signature changes.
The user has not created the override with the correct
signature.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
parent
20fa56d75d
commit
f64e61e44d
@ -27,7 +27,7 @@
|
||||
|
||||
struct RedCursorPipeItem: public RedPipeItemNum<RED_PIPE_ITEM_TYPE_CURSOR> {
|
||||
explicit RedCursorPipeItem(RedCursorCmd *cmd);
|
||||
~RedCursorPipeItem();
|
||||
~RedCursorPipeItem() override;
|
||||
RedCursorCmd *red_cursor;
|
||||
};
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ struct ChannelSecurityOptions {
|
||||
};
|
||||
|
||||
struct RedVDIReadBuf final: public RedAgentDataPipeItem {
|
||||
~RedVDIReadBuf();
|
||||
~RedVDIReadBuf() override;
|
||||
|
||||
RedCharDeviceVDIPort *dev;
|
||||
};
|
||||
@ -209,13 +209,13 @@ struct RedCharDeviceVDIPort: public RedCharDevice
|
||||
{
|
||||
explicit RedCharDeviceVDIPort(RedsState *reds);
|
||||
RedCharDeviceVDIPort();
|
||||
~RedCharDeviceVDIPort();
|
||||
~RedCharDeviceVDIPort() override;
|
||||
|
||||
virtual RedPipeItemPtr read_one_msg_from_device() override;
|
||||
virtual void send_msg_to_client(RedPipeItem *msg, RedCharDeviceClientOpaque *opaque) override;
|
||||
virtual void send_tokens_to_client(RedCharDeviceClientOpaque *opaque, uint32_t tokens) override;
|
||||
virtual void remove_client(RedCharDeviceClientOpaque *opaque) override;
|
||||
virtual void on_free_self_token() override;
|
||||
RedPipeItemPtr read_one_msg_from_device() override;
|
||||
void send_msg_to_client(RedPipeItem *msg, RedCharDeviceClientOpaque *opaque) override;
|
||||
void send_tokens_to_client(RedCharDeviceClientOpaque *opaque, uint32_t tokens) override;
|
||||
void remove_client(RedCharDeviceClientOpaque *opaque) override;
|
||||
void on_free_self_token() override;
|
||||
|
||||
RedCharDeviceVDIPortPrivate priv[1];
|
||||
};
|
||||
|
||||
@ -106,10 +106,10 @@ public:
|
||||
|
||||
inline SndChannel* get_channel();
|
||||
|
||||
virtual bool config_socket() override;
|
||||
virtual uint8_t *alloc_recv_buf(uint16_t type, uint32_t size) override;
|
||||
virtual void release_recv_buf(uint16_t type, uint32_t size, uint8_t *msg) override;
|
||||
virtual void migrate() override;
|
||||
bool config_socket() override;
|
||||
uint8_t *alloc_recv_buf(uint16_t type, uint32_t size) override;
|
||||
void release_recv_buf(uint16_t type, uint32_t size, uint8_t *msg) override;
|
||||
void migrate() override;
|
||||
|
||||
private:
|
||||
/* we don't expect very big messages so don't allocate too much
|
||||
@ -139,13 +139,13 @@ struct AudioFrameContainer
|
||||
class PlaybackChannelClient final: public SndChannelClient
|
||||
{
|
||||
protected:
|
||||
~PlaybackChannelClient();
|
||||
~PlaybackChannelClient() override;
|
||||
public:
|
||||
PlaybackChannelClient(PlaybackChannel *channel,
|
||||
RedClient *client,
|
||||
RedStream *stream,
|
||||
RedChannelCapabilities *caps);
|
||||
virtual bool init() override;
|
||||
bool init() override;
|
||||
|
||||
AudioFrameContainer *frames = nullptr;
|
||||
AudioFrame *free_frames = nullptr;
|
||||
@ -158,7 +158,7 @@ public:
|
||||
|
||||
static void on_message_marshalled(uint8_t *data, void *opaque);
|
||||
protected:
|
||||
virtual void send_item(RedPipeItem *item) override;
|
||||
void send_item(RedPipeItem *item) override;
|
||||
};
|
||||
|
||||
struct SpiceVolumeState {
|
||||
@ -171,7 +171,7 @@ struct SpiceVolumeState {
|
||||
struct SndChannel: public RedChannel
|
||||
{
|
||||
using RedChannel::RedChannel;
|
||||
~SndChannel();
|
||||
~SndChannel() override;
|
||||
void set_peer_common();
|
||||
bool active;
|
||||
SpiceVolumeState volume;
|
||||
@ -202,10 +202,10 @@ struct RecordChannel final: public SndChannel
|
||||
class RecordChannelClient final: public SndChannelClient
|
||||
{
|
||||
protected:
|
||||
~RecordChannelClient();
|
||||
~RecordChannelClient() override;
|
||||
public:
|
||||
using SndChannelClient::SndChannelClient;
|
||||
virtual bool init() override;
|
||||
bool init() override;
|
||||
|
||||
uint32_t samples[RECORD_SAMPLES_SIZE];
|
||||
uint32_t write_pos = 0;
|
||||
@ -216,8 +216,8 @@ public:
|
||||
SndCodec codec = nullptr;
|
||||
uint8_t decode_buf[SND_CODEC_MAX_FRAME_BYTES];
|
||||
protected:
|
||||
virtual bool handle_message(uint16_t type, uint32_t size, void *message) override;
|
||||
virtual void send_item(RedPipeItem *item) override;
|
||||
bool handle_message(uint16_t type, uint32_t size, void *message) override;
|
||||
void send_item(RedPipeItem *item) override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -63,12 +63,12 @@ struct RedVmcPipeItem: public RedPipeItemNum<RED_PIPE_ITEM_TYPE_SPICEVMC_DATA> {
|
||||
struct RedCharDeviceSpiceVmc: public RedCharDevice
|
||||
{
|
||||
RedCharDeviceSpiceVmc(SpiceCharDeviceInstance *sin, RedsState *reds, RedVmcChannel *channel);
|
||||
~RedCharDeviceSpiceVmc();
|
||||
~RedCharDeviceSpiceVmc() override;
|
||||
|
||||
virtual RedPipeItemPtr read_one_msg_from_device() override;
|
||||
virtual void remove_client(RedCharDeviceClientOpaque *opaque) override;
|
||||
virtual void on_free_self_token() override;
|
||||
virtual void port_event(uint8_t event) override;
|
||||
RedPipeItemPtr read_one_msg_from_device() override;
|
||||
void remove_client(RedCharDeviceClientOpaque *opaque) override;
|
||||
void on_free_self_token() override;
|
||||
void port_event(uint8_t event) override;
|
||||
|
||||
red::shared_ptr<RedVmcChannel> channel;
|
||||
};
|
||||
@ -78,7 +78,7 @@ static void spicevmc_red_channel_queue_data(RedVmcChannel *channel, red::shared_
|
||||
struct RedVmcChannel: public RedChannel
|
||||
{
|
||||
RedVmcChannel(RedsState *reds, uint32_t type, uint32_t id);
|
||||
~RedVmcChannel();
|
||||
~RedVmcChannel() override;
|
||||
|
||||
void on_connect(RedClient *client, RedStream *stream, int migration,
|
||||
RedChannelCapabilities *caps) override;
|
||||
@ -108,13 +108,13 @@ public:
|
||||
return static_cast<RedVmcChannel*>(RedChannelClient::get_channel());
|
||||
}
|
||||
protected:
|
||||
virtual uint8_t *alloc_recv_buf(uint16_t type, uint32_t size) override;
|
||||
virtual void release_recv_buf(uint16_t type, uint32_t size, uint8_t *msg) override;
|
||||
virtual void on_disconnect() override;
|
||||
virtual bool handle_message(uint16_t type, uint32_t size, void *msg) override;
|
||||
virtual void send_item(RedPipeItem *item) override;
|
||||
virtual bool handle_migrate_data(uint32_t size, void *message) override;
|
||||
virtual void handle_migrate_flush_mark() override;
|
||||
uint8_t *alloc_recv_buf(uint16_t type, uint32_t size) override;
|
||||
void release_recv_buf(uint16_t type, uint32_t size, uint8_t *msg) override;
|
||||
void on_disconnect() override;
|
||||
bool handle_message(uint16_t type, uint32_t size, void *msg) override;
|
||||
void send_item(RedPipeItem *item) override;
|
||||
bool handle_migrate_data(uint32_t size, void *message) override;
|
||||
void handle_migrate_flush_mark() override;
|
||||
};
|
||||
|
||||
static VmcChannelClient *
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
class StreamChannelClient final: public CommonGraphicsChannelClient
|
||||
{
|
||||
protected:
|
||||
~StreamChannelClient();
|
||||
~StreamChannelClient() override;
|
||||
public:
|
||||
using CommonGraphicsChannelClient::CommonGraphicsChannelClient;
|
||||
|
||||
@ -51,9 +51,9 @@ private:
|
||||
bool handle_preferred_video_codec_type(SpiceMsgcDisplayPreferredVideoCodecType *msg);
|
||||
void marshall_monitors_config(StreamChannel *channel, SpiceMarshaller *m);
|
||||
void fill_base(SpiceMarshaller *m, const StreamChannel *channel);
|
||||
virtual void on_disconnect() override;
|
||||
virtual bool handle_message(uint16_t type, uint32_t size, void *msg) override;
|
||||
virtual void send_item(RedPipeItem *pipe_item) override;
|
||||
void on_disconnect() override;
|
||||
bool handle_message(uint16_t type, uint32_t size, void *msg) override;
|
||||
void send_item(RedPipeItem *pipe_item) override;
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -72,7 +72,7 @@ struct StreamCreateItem: public RedPipeItemNum<RED_PIPE_ITEM_TYPE_STREAM_CREATE>
|
||||
};
|
||||
|
||||
struct StreamDataItem: public RedPipeItemNum<RED_PIPE_ITEM_TYPE_STREAM_DATA> {
|
||||
~StreamDataItem();
|
||||
~StreamDataItem() override;
|
||||
|
||||
StreamChannel *channel;
|
||||
// NOTE: this must be the last field in the structure
|
||||
|
||||
@ -44,8 +44,8 @@ struct RedTestChannel final: public RedChannel
|
||||
class RedTestChannelClient final: public RedChannelClient
|
||||
{
|
||||
using RedChannelClient::RedChannelClient;
|
||||
virtual uint8_t * alloc_recv_buf(uint16_t type, uint32_t size) override;
|
||||
virtual void release_recv_buf(uint16_t type, uint32_t size, uint8_t *msg) override;
|
||||
uint8_t * alloc_recv_buf(uint16_t type, uint32_t size) override;
|
||||
void release_recv_buf(uint16_t type, uint32_t size, uint8_t *msg) override;
|
||||
};
|
||||
|
||||
void
|
||||
|
||||
Loading…
Reference in New Issue
Block a user