From ecd6a3a20ab128ae9d3e356d6250695800dc13be Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Fri, 7 Jan 2022 09:18:40 -0800 Subject: Enable cppcoreguidelines-special-member-functions checks Part of enforcing cpp core guidelines involves explicitly including all constructors required on a non-trivial class. We were missing quite a few. In all cases, the copy/move/and operator= methods are simply deleted. Signed-off-by: Ed Tanous Change-Id: Ie8d6e8bf2bc311fa21a9ae48b0d61ee5c1940999 --- http/websocket.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'http/websocket.hpp') diff --git a/http/websocket.hpp b/http/websocket.hpp index 30a9b9f4b5..74bce581d2 100644 --- a/http/websocket.hpp +++ b/http/websocket.hpp @@ -29,6 +29,11 @@ struct Connection : std::enable_shared_from_this req(reqIn.req), userName{std::move(user)}, userdataPtr(nullptr) {} + Connection(const Connection&) = delete; + Connection(Connection&&) = delete; + Connection& operator=(const Connection&) = delete; + Connection& operator=(const Connection&&) = delete; + virtual void sendBinary(const std::string_view msg) = 0; virtual void sendBinary(std::string&& msg) = 0; virtual void sendText(const std::string_view msg) = 0; -- cgit v1.2.3