mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-18 22:05:48 -05: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
|
|
@ -373,8 +373,9 @@ struct wlr_texture *gles2_texture_from_buffer(struct wlr_renderer *wlr_renderer,
|
|||
void wlr_gles2_texture_get_attribs(struct wlr_texture *wlr_texture,
|
||||
struct wlr_gles2_texture_attribs *attribs) {
|
||||
struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
|
||||
memset(attribs, 0, sizeof(*attribs));
|
||||
attribs->target = texture->target;
|
||||
attribs->tex = texture->tex;
|
||||
attribs->has_alpha = texture->has_alpha;
|
||||
*attribs = (struct wlr_gles2_texture_attribs){
|
||||
.target = texture->target,
|
||||
.tex = texture->tex,
|
||||
.has_alpha = texture->has_alpha,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue