Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lzhangzz committed Nov 29, 2023
1 parent 82690c1 commit 9780108
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/turbomind/utils/dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ template<class F, class P, class G, int... Xs, std::size_t... Is>
bool dispatch_impl(F&& f, P&& p, G g, std::integer_sequence<int, Xs...>, std::index_sequence<Is...>)
{
constexpr int N = sizeof...(Xs);
return (((((P&&)p)(_Int<Xs>) || (g && Is == N - 1)) && (((F&&)f)(_Int<Xs>), 1)) || ...);
return (((((P &&) p)(_Int<Xs>) || (g && Is == N - 1)) && (((F &&) f)(_Int<Xs>), 1)) || ...);
}

} // namespace detail

template<class F, class P, int... Is, class G = std::true_type>
bool dispatch(std::integer_sequence<int, Is...> seq, P&& p, F&& f, G g = {})
{
return detail::dispatch_impl((F&&)f, (P&&)p, g, seq, std::make_index_sequence<sizeof...(Is)>{});
return detail::dispatch_impl((F &&) f, (P &&) p, g, seq, std::make_index_sequence<sizeof...(Is)>{});
}

template<class F, int... Is, class G = std::true_type>
bool dispatch(std::integer_sequence<int, Is...> seq, F&& f)
{
return (((F&&)f)(detail::_Int<Is>) || ...);
return (((F &&) f)(detail::_Int<Is>) || ...);
}

} // namespace turbomind

0 comments on commit 9780108

Please sign in to comment.