[Bf-blender-cvs] [d0d0cc998e2] vr_scene_inspection: Fix compiler warning on Linux, swapping with wrong type

Julian Eisel noreply at git.blender.org
Mon Feb 24 16:16:55 CET 2020


Commit: d0d0cc998e2d646f51414b09c7e174a35d715082
Author: Julian Eisel
Date:   Mon Feb 24 15:09:39 2020 +0100
Branches: vr_scene_inspection
https://developer.blender.org/rBd0d0cc998e2d646f51414b09c7e174a35d715082

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 437d42f0b5f..5b753416f24 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -578,10 +578,10 @@ void GPU_viewport_draw_to_screen_ex(GPUViewport *viewport,
   /* 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, display_colorspace);



More information about the Bf-blender-cvs mailing list