From da7d53782f4f44d0cba2ae7bb9bd764db53d1478 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Thu, 22 Sep 2016 20:39:39 +0200 Subject: [PATCH] wined3d: Use unsigned constants in shifts. Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/glsl_shader.c | 4 ++-- dlls/wined3d/utils.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index fbba28404a2..1c37e1c480c 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -9163,7 +9163,7 @@ static void glsl_vertex_pointsprite_core(struct wined3d_context *context, static void glsl_vertex_pipe_shademode(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; + context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX; } static void glsl_vertex_pipe_clip_plane(struct wined3d_context *context, @@ -9591,7 +9591,7 @@ static void glsl_fragment_pipe_color_key(struct wined3d_context *context, static void glsl_fragment_pipe_shademode(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; + context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_PIXEL; } static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index aa654ff0fef..0dae0d0ad53 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4953,10 +4953,10 @@ void wined3d_format_get_float_color_key(const struct wined3d_format *format, case WINED3DFMT_R8G8B8X8_UNORM: case WINED3DFMT_R16G16_UNORM: case WINED3DFMT_B10G10R10A2_UNORM: - slop.r = 0.5f / ((1 << format->red_size) - 1); - slop.g = 0.5f / ((1 << format->green_size) - 1); - slop.b = 0.5f / ((1 << format->blue_size) - 1); - slop.a = 0.5f / ((1 << format->alpha_size) - 1); + slop.r = 0.5f / ((1u << format->red_size) - 1); + slop.g = 0.5f / ((1u << format->green_size) - 1); + slop.b = 0.5f / ((1u << format->blue_size) - 1); + slop.a = 0.5f / ((1u << format->alpha_size) - 1); float_colors[0].r = color_to_float(key->color_space_low_value, format->red_size, format->red_offset) - slop.r;