]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view.c: assign struct rather than using memcpy
authorJohan Malm <jgm323@gmail.com>
Wed, 21 Jul 2021 18:25:34 +0000 (19:25 +0100)
committerJohan Malm <jgm323@gmail.com>
Wed, 21 Jul 2021 18:25:34 +0000 (19:25 +0100)
Suggested-by: @xerpi
src/view.c

index 2b57d86d2fcddbc3630c9764a83919725422a147..583bd9a2d2c37d54b91af7464f285ac4574612be 100644 (file)
@@ -76,10 +76,7 @@ view_center(struct view *view)
 static struct wlr_box
 usable_area_in_layout_coords(struct output *output)
 {
-       struct wlr_box box;
-
-       memcpy(&box, &output->usable_area, sizeof(struct wlr_box));
-
+       struct wlr_box box = output->usable_area;
        double ox = 0, oy = 0;
        wlr_output_layout_output_coords(output->server->output_layout,
                output->wlr_output, &ox, &oy);