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

FBasicParticle: simplify `attributes` method implementation

parent 2bcc4aeb
...@@ -194,9 +194,7 @@ public: ...@@ -194,9 +194,7 @@ public:
*/ */
types_tuple_t attributes() const { types_tuple_t attributes() const {
return attributes_impl( return attributes_impl(
std::make_index_sequence<std::tuple_size<types_tuple_t>::value>(), std::make_index_sequence<std::tuple_size<types_tuple_t>::value>());
types_tuple_t()
);
} }
/** /**
...@@ -276,12 +274,9 @@ private: ...@@ -276,12 +274,9 @@ private:
* *
* \param pos new position * \param pos new position
*/ */
template<std::size_t... Is, typename... Attributes> template<std::size_t... Is>
std::tuple<Attributes...> attributes_impl(std::index_sequence<Is...>, types_tuple_t attributes_impl(std::index_sequence<Is...>) const {
std::tuple<Attributes...>) return types_tuple_t(std::get<Is+Dim>(*this)...);
const
{
return std::tuple<Attributes...>(std::get<Is+Dim>(this->data())...);
} }
}; };
......
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