Use struct initializers instead of memset()

This is a bit more type-safe.
This commit is contained in:
Simon Ser 2023-07-07 14:34:56 +02:00
parent 4966857f21
commit 7a9f8d8d6b
34 changed files with 134 additions and 113 deletions

View file

@ -15,8 +15,9 @@ struct wlr_render_pass_legacy {
void wlr_render_pass_init(struct wlr_render_pass *render_pass,
const struct wlr_render_pass_impl *impl) {
assert(impl->submit && impl->add_texture && impl->add_rect);
memset(render_pass, 0, sizeof(*render_pass));
render_pass->impl = impl;
*render_pass = (struct wlr_render_pass){
.impl = impl,
};
}
bool wlr_render_pass_submit(struct wlr_render_pass *render_pass) {