Skip to content

Commit

Permalink
"First, Second"template for get_mut_second
Browse files Browse the repository at this point in the history
  • Loading branch information
ebkgne authored and SanderMertens committed Aug 29, 2022
1 parent 24dda1c commit 2e65827
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions flecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18864,6 +18864,17 @@ struct entity : entity_builder<entity>
ecs_get_mut_id(m_world, m_id, ecs_pair(first, second)));
}

/** Get mutable pointer for the second element of a pair.
* This operation gets the value for a pair from the entity.
*
* @tparam Second The second element of the pair.
* @param first The first element of the pair.
*/
template <typename First, typename Second>
Second* get_mut_second() const {
return this->get_mut_second<Second>(_::cpp_type<First>::id(m_world));
}

/** Signal that component was modified.
*
* @tparam T component that was modified.
Expand Down

0 comments on commit 2e65827

Please sign in to comment.