Take boost error_code by reference
By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a copy in some cases.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id42ea4a90b6685a84818b87d1506c11256b3b9ae
diff --git a/include/async_resolve.hpp b/include/async_resolve.hpp
index 0027a05..f44be4b 100644
--- a/include/async_resolve.hpp
+++ b/include/async_resolve.hpp
@@ -37,7 +37,7 @@
uint64_t flag = 0;
crow::connections::systemBus->async_method_call(
[host, port, handler{std::forward<ResolveHandler>(handler)}](
- const boost::system::error_code ec,
+ const boost::system::error_code& ec,
const std::vector<
std::tuple<int32_t, int32_t, std::vector<uint8_t>>>& resp,
const std::string& hostName, const uint64_t flagNum) {