Simplify sc_size assignment
Assign the whole struct instead of each field separately.
This commit is contained in:
parent
720c3064df
commit
2f091beeaa
1 changed files with 1 additions and 2 deletions
|
@ -101,8 +101,7 @@ get_optimal_size(struct sc_size current_size, struct sc_size content_size) {
|
|||
struct sc_size display_size;
|
||||
if (!get_preferred_display_bounds(&display_size)) {
|
||||
// could not get display bounds, do not constraint the size
|
||||
window_size.width = current_size.width;
|
||||
window_size.height = current_size.height;
|
||||
window_size = current_size;
|
||||
} else {
|
||||
window_size.width = MIN(current_size.width, display_size.width);
|
||||
window_size.height = MIN(current_size.height, display_size.height);
|
||||
|
|
Loading…
Reference in a new issue