diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-31 09:23:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-31 17:17:21 +0300 |
commit | 9e9cd77b8de68015a98659671272cc9d78710e69 (patch) | |
tree | a705baa2b3d4c2667085815c865a826c1f884173 /source/blender/editors/include/BIF_gl.h | |
parent | 535de7ec1fee94eae1769630b512c6ef4eb5bcad (diff) |
Compiler warning: double-promotion
Diffstat (limited to 'source/blender/editors/include/BIF_gl.h')
-rw-r--r-- | source/blender/editors/include/BIF_gl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h index b06af01bab6..3b7d7bac44f 100644 --- a/source/blender/editors/include/BIF_gl.h +++ b/source/blender/editors/include/BIF_gl.h @@ -35,10 +35,6 @@ #include "GPU_glew.h" -/* hacking pointsize and linewidth */ -#define glPointSize(f) glPointSize(U.pixelsize * (f)) -#define glLineWidth(f) glLineWidth(U.pixelsize * (f)) - /* * these should be phased out. cpack should be replaced in * code with calls to glColor3ub. - zr @@ -51,7 +47,6 @@ * */ void cpack(unsigned int x); - #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define glMultMatrixf(x) \ glMultMatrixf(_Generic((x), \ @@ -71,9 +66,14 @@ void cpack(unsigned int x); float (*)[4]: (float *)(x), \ float [4][4]: (float *)(x)) \ ) +/* hacking pointsize and linewidth */ +#define glPointSize(f) glPointSize(U.pixelsize * _Generic((f), double: (float)(f), default: (f))) +#define glLineWidth(f) glLineWidth(U.pixelsize * _Generic((f), double: (float)(f), default: (f))) #else # define glMultMatrixf(x) glMultMatrixf((float *)(x)) # define glLoadMatrixf(x) glLoadMatrixf((float *)(x)) +#define glPointSize(f) glPointSize(U.pixelsize * (f)) +#define glLineWidth(f) glLineWidth(U.pixelsize * (f)) #endif #define GLA_PIXEL_OFS 0.375f |