Skip to content

Commit 9572121

Browse files
authored
Fix GCC build
1 parent 48de7b4 commit 9572121

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

hooks/HookHelpers.h

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,18 @@ void Eluna::ReplaceArgument(T value, int index)
115115
template<typename... Outs, size_t... Is>
116116
void Eluna::ApplyMultiReturnsImpl(int r, std::tuple<Outs&...>& outs, const std::array<int, sizeof...(Outs)>& indices, std::index_sequence<Is...>)
117117
{
118-
((
119-
[&] {
120-
using T = std::remove_reference_t<std::tuple_element_t<Is, std::tuple<Outs&...>>>;
121-
const int idx = r + static_cast<int>(Is);
122-
123-
if (LuaRet<T>::Is(L, idx))
124-
{
125-
std::get<Is>(outs) = LuaRet<T>::Get(this, L, idx);
126-
127-
if (indices[Is] != 0)
128-
ReplaceArgument(std::get<Is>(outs), indices[Is]);
129-
}
130-
}(),
131-
0
132-
), ...);
118+
( [&] {
119+
using T = std::remove_reference_t<std::tuple_element_t<Is, std::tuple<Outs&...>>>;
120+
const int idx = r + static_cast<int>(Is);
121+
122+
if (LuaRet<T>::Is(L, idx))
123+
{
124+
std::get<Is>(outs) = LuaRet<T>::Get(this, L, idx);
125+
126+
if (indices[Is] != 0)
127+
ReplaceArgument(std::get<Is>(outs), indices[Is]);
128+
}
129+
}(), ... );
133130
}
134131

135132
/*

0 commit comments

Comments
 (0)