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 authored and luis4a0 committed Nov 7, 2023
1 parent 3f253d7 commit e5bf469
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 e5bf469

Please sign in to comment.