mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
clang-tidy: add explicit to single argument constructors
Found with google-explicit-constructor Explicit prevents type conversions for safety reasons. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
11374b28b4
commit
76f4dc436a
@ -26,7 +26,7 @@
|
||||
#include "reds.h"
|
||||
|
||||
struct RedCursorPipeItem: public RedPipeItemNum<RED_PIPE_ITEM_TYPE_CURSOR> {
|
||||
RedCursorPipeItem(RedCursorCmd *cmd);
|
||||
explicit RedCursorPipeItem(RedCursorCmd *cmd);
|
||||
~RedCursorPipeItem();
|
||||
RedCursorCmd *red_cursor;
|
||||
};
|
||||
|
||||
@ -45,7 +45,7 @@ struct DispatcherMessage {
|
||||
|
||||
struct DispatcherPrivate {
|
||||
SPICE_CXX_GLIB_ALLOCATOR
|
||||
DispatcherPrivate(uint32_t init_max_message_type):
|
||||
explicit DispatcherPrivate(uint32_t init_max_message_type):
|
||||
max_message_type(init_max_message_type)
|
||||
{
|
||||
}
|
||||
|
||||
@ -87,12 +87,12 @@ RedsState* spice_tablet_state_get_server(SpiceTabletState *st)
|
||||
}
|
||||
|
||||
struct RedKeyModifiersPipeItem: public RedPipeItemNum<RED_PIPE_ITEM_KEY_MODIFIERS> {
|
||||
RedKeyModifiersPipeItem(uint8_t modifiers);
|
||||
explicit RedKeyModifiersPipeItem(uint8_t modifiers);
|
||||
uint8_t modifiers;
|
||||
};
|
||||
|
||||
struct RedInputsInitPipeItem: public RedPipeItemNum<RED_PIPE_ITEM_INPUTS_INIT> {
|
||||
RedInputsInitPipeItem(uint8_t modifiers);
|
||||
explicit RedInputsInitPipeItem(uint8_t modifiers);
|
||||
uint8_t modifiers;
|
||||
};
|
||||
|
||||
|
||||
@ -207,7 +207,7 @@ struct SPICE_ATTR_PACKED VDInternalBuf {
|
||||
|
||||
struct RedCharDeviceVDIPort: public RedCharDevice
|
||||
{
|
||||
RedCharDeviceVDIPort(RedsState *reds);
|
||||
explicit RedCharDeviceVDIPort(RedsState *reds);
|
||||
RedCharDeviceVDIPort();
|
||||
~RedCharDeviceVDIPort();
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ inline SndChannel* SndChannelClient::get_channel()
|
||||
|
||||
struct PlaybackChannel final: public SndChannel
|
||||
{
|
||||
PlaybackChannel(RedsState *reds);
|
||||
explicit PlaybackChannel(RedsState *reds);
|
||||
void on_connect(RedClient *client, RedStream *stream,
|
||||
int migration, RedChannelCapabilities *caps) override;
|
||||
};
|
||||
@ -193,7 +193,7 @@ struct PlaybackChannel final: public SndChannel
|
||||
|
||||
struct RecordChannel final: public SndChannel
|
||||
{
|
||||
RecordChannel(RedsState *reds);
|
||||
explicit RecordChannel(RedsState *reds);
|
||||
void on_connect(RedClient *client, RedStream *stream,
|
||||
int migration, RedChannelCapabilities *caps) override;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user