Removed copy and move constructors from AsyncResp
Tested:
- Bmcweb compiles
Change-Id: I233eaa787f73a82a7dbdd1ef569acd5d655f734d
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/include/async_resp.hpp b/include/async_resp.hpp
index 8267c47..ac9db19 100644
--- a/include/async_resp.hpp
+++ b/include/async_resp.hpp
@@ -20,6 +20,9 @@
res(response), func(std::move(function))
{}
+ AsyncResp(const AsyncResp&) = delete;
+ AsyncResp(AsyncResp&&) = delete;
+
~AsyncResp()
{
if (func && res.result() == boost::beast::http::status::ok)
diff --git a/redfish-core/include/rf_async_resp.hpp b/redfish-core/include/rf_async_resp.hpp
index 27625d5..b6dacc7 100644
--- a/redfish-core/include/rf_async_resp.hpp
+++ b/redfish-core/include/rf_async_resp.hpp
@@ -15,6 +15,9 @@
AsyncResp(crow::Response& response) : res(response)
{}
+ AsyncResp(const AsyncResp&) = delete;
+ AsyncResp(AsyncResp&&) = delete;
+
~AsyncResp()
{
res.end();
@@ -23,4 +26,4 @@
crow::Response& res;
};
-} // namespace redfish
\ No newline at end of file
+} // namespace redfish