mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
Merge pull request #14 from taiyu-len/master
fixed 'return NULL' in 'void container_map(...)'
This commit is contained in:
commit
4aeaaa8abc
1 changed files with 3 additions and 3 deletions
|
@ -3,16 +3,16 @@
|
||||||
|
|
||||||
void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) {
|
void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) {
|
||||||
if (!container->children) {
|
if (!container->children) {
|
||||||
return NULL;
|
return;
|
||||||
}
|
}
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < container->children->length; ++i) {
|
for (i = 0; i < container->children->length; ++i) {
|
||||||
swayc_t *child = container->children->items[i];
|
swayc_t *child = container->children->items[i];
|
||||||
f(child, data);
|
f(child, data);
|
||||||
|
|
||||||
if(child->children)
|
if (child->children) {
|
||||||
container_map(child, f, data);
|
container_map(child, f, data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue