Skip to content

Commit

Permalink
format_as: pass by reference instead of value
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Garay <[email protected]>
  • Loading branch information
fgaray committed Dec 28, 2023
1 parent 31d7e3d commit 475bd0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dst/src/BalancerConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void BalancerConnection::handle_read(boost::system::error_code const& err,
#if !SWIG && FMT_VERSION >= 100000
namespace boost::asio::ip {

static auto format_as(const boost::asio::ip::address f)
static auto format_as(const boost::asio::ip::address& f)
{
return fmt::streamed(f);
}
Expand Down
2 changes: 1 addition & 1 deletion src/dst/src/LoadBalancer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void LoadBalancer::handle_accept(const BalancerConnection::pointer& connection,
#if !SWIG && FMT_VERSION >= 100000
namespace boost::asio::ip {

static auto format_as(const boost::asio::ip::address f)
static auto format_as(const boost::asio::ip::address& f)
{
return fmt::streamed(f);
}
Expand Down
2 changes: 1 addition & 1 deletion src/utl/include/utl/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ struct test_ostream

template <class T,
class = std::enable_if_t<decltype(test_ostream::test<T>(0))::value>>
auto format_as(T t)
auto format_as(const T& t)
{
return fmt::streamed(t);
}
Expand Down

0 comments on commit 475bd0d

Please sign in to comment.