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 e118b9a commit d7703bf
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 @@ -277,7 +277,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 d7703bf

Please sign in to comment.