diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-11 15:36:19 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-11 15:36:19 +1000 |
commit | 31844bf42bc4b6549862ea4c4f077c1e19d9e7a1 (patch) | |
tree | f24bbab4a5a54936ddca9b823e4103ea630e993b /sway/tree | |
parent | e474d87e42d625eb4e0a41a0559bbf0e4ec5ecc5 (diff) | |
download | sway-31844bf42bc4b6549862ea4c4f077c1e19d9e7a1.tar.xz |
Remove container_has_child
In all cases you can use container_has_ancestor with the arguments
swapped, which is faster than container_has_child.
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index aecb2ac6..cec51af4 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -817,19 +817,6 @@ bool container_has_ancestor(struct sway_container *descendant, return false; } -static bool find_child_func(struct sway_container *con, void *data) { - struct sway_container *child = data; - return con == child; -} - -bool container_has_child(struct sway_container *con, - struct sway_container *child) { - if (con == NULL || con->type == C_VIEW) { - return false; - } - return container_find(con, find_child_func, child); -} - int container_count_descendants_of_type(struct sway_container *con, enum sway_container_type type) { int children = 0; |