mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 08:32:30 +00:00
util/addon: avoid calling finish() twice
No functional change.
This commit is contained in:
parent
cde3700386
commit
4ac19e9f9c
@ -20,6 +20,7 @@ struct wlr_addon;
|
|||||||
|
|
||||||
struct wlr_addon_interface {
|
struct wlr_addon_interface {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
// Has to call wlr_addon_finish()
|
||||||
void (*destroy)(struct wlr_addon *addon);
|
void (*destroy)(struct wlr_addon *addon);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ void wlr_addon_set_init(struct wlr_addon_set *set) {
|
|||||||
void wlr_addon_set_finish(struct wlr_addon_set *set) {
|
void wlr_addon_set_finish(struct wlr_addon_set *set) {
|
||||||
struct wlr_addon *addon, *tmp;
|
struct wlr_addon *addon, *tmp;
|
||||||
wl_list_for_each_safe(addon, tmp, &set->addons, link) {
|
wl_list_for_each_safe(addon, tmp, &set->addons, link) {
|
||||||
wlr_addon_finish(addon);
|
|
||||||
addon->impl->destroy(addon);
|
addon->impl->destroy(addon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -34,7 +33,6 @@ void wlr_addon_init(struct wlr_addon *addon, struct wlr_addon_set *set,
|
|||||||
|
|
||||||
void wlr_addon_finish(struct wlr_addon *addon) {
|
void wlr_addon_finish(struct wlr_addon *addon) {
|
||||||
wl_list_remove(&addon->link);
|
wl_list_remove(&addon->link);
|
||||||
wl_list_init(&addon->link);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_addon *wlr_addon_find(struct wlr_addon_set *set, const void *owner,
|
struct wlr_addon *wlr_addon_find(struct wlr_addon_set *set, const void *owner,
|
||||||
|
Loading…
Reference in New Issue
Block a user