st/wgl: eliminate implicit cast warning
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 20 Sep 2019 14:07:47 +0000 (16:07 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 14 Jan 2020 11:01:00 +0000 (12:01 +0100)
I get warnings on MSVC for these implicit casts. Let's use explicit
casts instead.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/state_trackers/wgl/stw_wgl.c

index 532a5adb955ac0c40e0cd9d3393c4ff2dd0fbb9d..846069f56b911057e8263b9e869ae68885e432a0 100644 (file)
@@ -258,8 +258,10 @@ wglUseFontBitmapsW(
 
       if (size != GDI_ERROR) {
          if (size == 0) {
-            glBitmap(0, 0, -gm.gmptGlyphOrigin.x, gm.gmptGlyphOrigin.y,
-                     gm.gmCellIncX, gm.gmCellIncY, NULL);
+            glBitmap(0, 0, (GLfloat)-gm.gmptGlyphOrigin.x,
+                     (GLfloat)gm.gmptGlyphOrigin.y,
+                     (GLfloat)gm.gmCellIncX,
+                     (GLfloat)gm.gmCellIncY, NULL);
          }
          else {
             buffer = realloc(buffer, size);