17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 15:07:29 +01:00

refactor(sonar): mark converting constructors explicit (cpp:S1709)

sound_source and the gl::object conversion operators stay implicit; they
are relied upon by copy-list-initialisation and GL calls.
This commit is contained in:
jerrrrycho
2026-10-10 16:55:10 +02:00
parent 34c0c8182d
commit c2449db91d
18 changed files with 22 additions and 22 deletions

View File

@@ -18,7 +18,7 @@ namespace network::tcp
friend class client;
public:
connection(asio::io_context &io_ctx, bool client = false, size_t counter = 0);
explicit connection(asio::io_context &io_ctx, bool client = false, size_t counter = 0);
~connection();
void connected() override;

View File

@@ -18,7 +18,7 @@ struct message
type_e type;
message(type_e t) : type(t) {}
explicit message(type_e t) : type(t) {}
virtual void serialize(std::ostream &stream) const { /* message carries no payload */ }
virtual void deserialize(std::istream &stream) { /* message carries no payload */ }
virtual ~message() = default;

View File

@@ -35,7 +35,7 @@ namespace network
virtual void send_message(const message &msg) = 0;
virtual void send_messages(const std::vector<std::shared_ptr<message>> &messages) = 0;
connection(bool client = false, size_t counter = 0);
explicit connection(bool client = false, size_t counter = 0);
void set_handler(std::function<void(const message &msg)> handler);
virtual void disconnect() = 0;
@@ -63,7 +63,7 @@ namespace network
command_queue::commands_map client_commands_queue;
public:
server(std::shared_ptr<std::istream> buf);
explicit server(std::shared_ptr<std::istream> buf);
void push_delta(const frame_info &msg);
command_queue::commands_map pop_commands();
};