mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Use wl_container_of() instead of casts
This slightly improves type safety.
The culprits were found with:
git grep -E '\([a-z0-9_ ]+ \*\)\W?[a-z]'
This commit is contained in:
parent
c2c536de03
commit
fe06e5f49a
29 changed files with 85 additions and 55 deletions
|
|
@ -21,7 +21,8 @@ struct subbackend_state {
|
|||
static struct wlr_multi_backend *multi_backend_from_backend(
|
||||
struct wlr_backend *wlr_backend) {
|
||||
assert(wlr_backend_is_multi(wlr_backend));
|
||||
return (struct wlr_multi_backend *)wlr_backend;
|
||||
struct wlr_multi_backend *backend = wl_container_of(wlr_backend, backend, backend);
|
||||
return backend;
|
||||
}
|
||||
|
||||
static bool multi_backend_start(struct wlr_backend *wlr_backend) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue