Skip to content

Commit

Permalink
[utils] Fix ignored custom filter in trim
Browse files Browse the repository at this point in the history
  • Loading branch information
ricab committed Oct 30, 2023
1 parent bc394d8 commit 6baa7a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/multipass/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ Str&& multipass::utils::trim_end(Str&& s)
template <typename Str, typename Filter>
Str&& multipass::utils::trim(Str&& s, Filter&& filter)
{
return trim_begin(trim_end(std::forward<Str>(s), std::forward<Filter>(filter)));
auto&& ret = trim_end(std::forward<Str>(s), filter);
return trim_begin(std::forward<decltype(ret)>(ret), std::forward<Filter>(filter));
}

template <typename Str>
Expand Down

0 comments on commit 6baa7a4

Please sign in to comment.