Commit 4c207d1e authored by Quentin Khan's avatar Quentin Khan
Browse files

FBasicParticle: simplify `attributes` method implementation

parent 2bcc4aeb
......@@ -194,9 +194,7 @@ public:
*/
types_tuple_t attributes() const {
return attributes_impl(
std::make_index_sequence<std::tuple_size<types_tuple_t>::value>(),
types_tuple_t()
);
std::make_index_sequence<std::tuple_size<types_tuple_t>::value>());
}
/**
......@@ -276,12 +274,9 @@ private:
*
* \param pos new position
*/
template<std::size_t... Is, typename... Attributes>
std::tuple<Attributes...> attributes_impl(std::index_sequence<Is...>,
std::tuple<Attributes...>)
const
{
return std::tuple<Attributes...>(std::get<Is+Dim>(this->data())...);
template<std::size_t... Is>
types_tuple_t attributes_impl(std::index_sequence<Is...>) const {
return types_tuple_t(std::get<Is+Dim>(*this)...);
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment