diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-03-03 12:49:08 +0100 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-03-20 13:47:42 +0100 |
commit | 79ba22a73f238ebd110fc5f3744c3c12a9a59475 (patch) | |
tree | ff5d57ddb759c04297aa6482cdc389ca8bc0c2cf /editor/plugins/editor_preview_plugins.cpp | |
parent | fe01776f05b1787b28b4a270d53037a3c25f4ca2 (diff) | |
download | redot-engine-79ba22a73f238ebd110fc5f3744c3c12a9a59475.tar.gz |
Use `Vector*` component-wise `min/max/clamp` functions where applicable
Diffstat (limited to 'editor/plugins/editor_preview_plugins.cpp')
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index e8804fdf12..70213b280c 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -130,7 +130,7 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const Ref<Resource> &p_from, if (new_size.y > p_size.y) { new_size = Vector2(new_size.x * p_size.y / new_size.y, p_size.y); } - Vector2i new_size_i(MAX(1, (int)new_size.x), MAX(1, (int)new_size.y)); + Vector2i new_size_i = Vector2i(new_size).max(Vector2i(1, 1)); img->resize(new_size_i.x, new_size_i.y, Image::INTERPOLATE_CUBIC); post_process_preview(img); |