mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Use struct initializers instead of memset()
This is a bit more type-safe.
This commit is contained in:
parent
4966857f21
commit
7a9f8d8d6b
34 changed files with 134 additions and 113 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue