Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2020-02-24 17:09:39 +0300
committerJulian Eisel <eiseljulian@gmail.com>2020-03-02 16:51:20 +0300
commite62a012f9023d6ccc79f149e8bee770ab4928580 (patch)
tree8e92ba3b827cf795bd10cfbac440020b4d60281a /source/blender/gpu/intern/gpu_viewport.c
parentbe7b41df3ff45c08ce79d4d4c8aca8416ac39a9d (diff)
Fix compiler warning on Linux, swapping with wrong type
Diffstat (limited to 'source/blender/gpu/intern/gpu_viewport.c')
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 8db9102de7c..351c85aa2d8 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -579,10 +579,10 @@ void GPU_viewport_draw_to_screen(GPUViewport *viewport, const rcti *rect)
/* Mirror the UV rect in case axis-swapped drawing is requested (by passing a rect with min and
* max values swapped). */
if (BLI_rcti_size_x(rect) < 0) {
- SWAP(int, uv_rect.xmin, uv_rect.xmax);
+ SWAP(float, uv_rect.xmin, uv_rect.xmax);
}
if (BLI_rcti_size_y(rect) < 0) {
- SWAP(int, uv_rect.ymin, uv_rect.ymax);
+ SWAP(float, uv_rect.ymin, uv_rect.ymax);
}
gpu_viewport_draw_colormanaged(viewport, &pos_rect, &uv_rect, true);