17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-28 13:27:30 +01:00

fix(sonar): give polymorphic base classes virtual destructors (cpp:S1235)

This commit is contained in:
jerrrrycho
2026-10-10 15:48:07 +02:00
parent 6fce71af36
commit 8d93367de7
6 changed files with 10 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ struct message
message(type_e t) : type(t) {}
virtual void serialize(std::ostream &stream) const {}
virtual void deserialize(std::istream &stream) {}
virtual ~message() = default;
};
struct client_hello : public message

View File

@@ -47,6 +47,7 @@ namespace network
DEAD
};
peer_state state;
virtual ~connection() = default;
};
class server
@@ -104,6 +105,7 @@ namespace network
int get_awaiting_frames() const {
return static_cast<int>(delta_queue.size());
}
virtual ~client() = default;
};
class backend_manager
@@ -112,6 +114,7 @@ namespace network
virtual std::shared_ptr<server> create_server(std::shared_ptr<std::fstream>, const std::string &conf) = 0;
virtual std::shared_ptr<client> create_client(const std::string &conf) = 0;
virtual void update() = 0;
virtual ~backend_manager() = default;
};
// HACK: static initialization order fiasco fix