Skip to content

Commit

Permalink
Move world::get_info out of pipeline mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroErrors committed Aug 2, 2023
1 parent f913e08 commit 41a3226
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
16 changes: 7 additions & 9 deletions flecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19827,6 +19827,13 @@ struct world {
ecs_run_post_frame(m_world, action, ctx);
}

/** Get the world info.
* @see ecs_get_world_info
*/
const flecs::world_info_t* get_info() const{
return ecs_get_world_info(m_world);
}

/**
* @file addons/cpp/mixins/id/mixin.inl
* @brief Id world mixin.
Expand Down Expand Up @@ -20217,11 +20224,6 @@ void run_pipeline(const flecs::entity_t pip, ecs_ftime_t delta_time = 0.0) const
template <typename Pipeline, if_not_t< is_enum<Pipeline>::value > = 0>
void run_pipeline(ecs_ftime_t delta_time = 0.0) const;

/** Get the world info.
* @see ecs_get_world_info
*/
const flecs::world_info_t* get_info() const;

/** Set timescale.
* @see ecs_set_time_scale
*/
Expand Down Expand Up @@ -28452,10 +28454,6 @@ inline void world::run_pipeline(ecs_ftime_t delta_time) const {
return ecs_run_pipeline(m_world, _::cpp_type<Pipeline>::id(m_world), delta_time);
}

const flecs::world_info_t* world::get_info() const {
return ecs_get_world_info(m_world);
}

inline void world::set_time_scale(ecs_ftime_t mul) const {
ecs_set_time_scale(m_world, mul);
}
Expand Down
4 changes: 0 additions & 4 deletions include/flecs/addons/cpp/mixins/pipeline/impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ inline void world::run_pipeline(ecs_ftime_t delta_time) const {
return ecs_run_pipeline(m_world, _::cpp_type<Pipeline>::id(m_world), delta_time);
}

const flecs::world_info_t* world::get_info() const {
return ecs_get_world_info(m_world);
}

inline void world::set_time_scale(ecs_ftime_t mul) const {
ecs_set_time_scale(m_world, mul);
}
Expand Down
5 changes: 0 additions & 5 deletions include/flecs/addons/cpp/mixins/pipeline/mixin.inl
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ void run_pipeline(const flecs::entity_t pip, ecs_ftime_t delta_time = 0.0) const
template <typename Pipeline, if_not_t< is_enum<Pipeline>::value > = 0>
void run_pipeline(ecs_ftime_t delta_time = 0.0) const;

/** Get the world info.
* @see ecs_get_world_info
*/
const flecs::world_info_t* get_info() const;

/** Set timescale.
* @see ecs_set_time_scale
*/
Expand Down
7 changes: 7 additions & 0 deletions include/flecs/addons/cpp/world.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,13 @@ struct world {
ecs_run_post_frame(m_world, action, ctx);
}

/** Get the world info.
* @see ecs_get_world_info
*/
const flecs::world_info_t* get_info() const{
return ecs_get_world_info(m_world);
}

# include "mixins/id/mixin.inl"
# include "mixins/component/mixin.inl"
# include "mixins/entity/mixin.inl"
Expand Down

0 comments on commit 41a3226

Please sign in to comment.