Skip to content

Commit

Permalink
mod: remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
quesnel committed May 13, 2024
1 parent 6f145ce commit b44c5ba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
28 changes: 0 additions & 28 deletions lib/include/irritator/modeling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,11 +1148,6 @@ class modeling
/// Clean data used as cache for simulation.
void clean_simulation() noexcept;

/// If the @c child references a model, model is freed, otherwise, do
/// nothing. This function is useful to replace the content of a existing @c
/// child
void clear(child& c) noexcept;

/// Clear and free all dependencies of the component but let the component
/// alive.
void clear(component& c) noexcept;
Expand Down Expand Up @@ -1330,12 +1325,6 @@ class project
auto node(tree_node& node) const noexcept -> tree_node_id;
auto node(const tree_node& node) const noexcept -> tree_node_id;

template<typename Function, typename... Args>
auto for_all_tree_nodes(Function&& f, Args... args) noexcept;

template<typename Function, typename... Args>
auto for_all_tree_nodes(Function&& f, Args... args) const noexcept;

template<typename Function, typename... Args>
void for_each_children(tree_node& tn, Function&& f, Args... args) noexcept;

Expand Down Expand Up @@ -1512,23 +1501,6 @@ inline tree_node::tree_node(component_id id_, u64 unique_id_) noexcept
Project part
*/

template<typename Function, typename... Args>
inline auto project::for_all_tree_nodes(Function&& f, Args... args) noexcept
{
tree_node* tn = nullptr;
while (tree_nodes.next(tn))
return f(*tn, args...);
}

template<typename Function, typename... Args>
inline auto project::for_all_tree_nodes(Function&& f,
Args... args) const noexcept
{
const tree_node* tn = nullptr;
while (tree_nodes.next(tn))
return f(*tn, args...);
}

template<typename Function, typename... Args>
inline void project::for_each_children(tree_node& tn,
Function&& f,
Expand Down
6 changes: 0 additions & 6 deletions lib/src/modeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,12 +837,6 @@ void modeling::clean_simulation() noexcept
clear_grid_component_cache(*grid);
}

void modeling::clear(child& c) noexcept
{
c.id.mdl_type = dynamics_type::constant;
c.type = child_type::model;
}

void modeling::clear(component& compo) noexcept
{
switch (compo.type) {
Expand Down

0 comments on commit b44c5ba

Please sign in to comment.