[Bf-blender-cvs] [e62a012f902] soc-2019-openxr: Fix compiler warning on Linux, swapping with wrong type
Julian Eisel
noreply at git.blender.org
Mon Mar 2 17:13:50 CET 2020
Commit: e62a012f9023d6ccc79f149e8bee770ab4928580
Author: Julian Eisel
Date: Mon Feb 24 15:09:39 2020 +0100
Branches: soc-2019-openxr
https://developer.blender.org/rBe62a012f9023d6ccc79f149e8bee770ab4928580
Fix compiler warning on Linux, swapping with wrong type
===================================================================
M source/blender/gpu/intern/gpu_viewport.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list