Remove container_has_child

In all cases you can use container_has_ancestor with the arguments
swapped, which is faster than container_has_child.
This commit is contained in:
Ryan Dwyer 2018-08-11 15:36:19 +10:00
parent e474d87e42
commit 31844bf42b
3 changed files with 3 additions and 22 deletions

View file

@ -256,12 +256,6 @@ void container_for_each_descendant_dfs(struct sway_container *container,
bool container_has_ancestor(struct sway_container *container,
struct sway_container *ancestor);
/**
* Returns true if the given container is a child descendant of this container.
*/
bool container_has_child(struct sway_container *con,
struct sway_container *child);
int container_count_descendants_of_type(struct sway_container *con,
enum sway_container_type type);