From ceb9994669e8eb0802426cb3434c155fbdaba336 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 26 Jan 2022 15:43:39 +0100 Subject: [PATCH] wined3d: Use wined3d_uint32_compare() in compare_sig(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/arb_program_shader.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 1abc64ccdd1..820ba0199e8 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -3855,16 +3855,16 @@ static int compare_sig(const struct wined3d_shader_signature *sig1, const struct if ((ret = strcmp(e1->semantic_name, e2->semantic_name))) return ret; - if (e1->semantic_idx != e2->semantic_idx) - return e1->semantic_idx < e2->semantic_idx ? -1 : 1; - if (e1->sysval_semantic != e2->sysval_semantic) - return e1->sysval_semantic < e2->sysval_semantic ? -1 : 1; - if (e1->component_type != e2->component_type) - return e1->component_type < e2->component_type ? -1 : 1; - if (e1->register_idx != e2->register_idx) - return e1->register_idx < e2->register_idx ? -1 : 1; - if (e1->mask != e2->mask) - return e1->mask < e2->mask ? -1 : 1; + if ((ret = wined3d_uint32_compare(e1->semantic_idx, e2->semantic_idx))) + return ret; + if ((ret = wined3d_uint32_compare(e1->sysval_semantic, e2->sysval_semantic))) + return ret; + if ((ret = wined3d_uint32_compare(e1->component_type, e2->component_type))) + return ret; + if ((ret = wined3d_uint32_compare(e1->register_idx, e2->register_idx))) + return ret; + if ((ret = wined3d_uint32_compare(e1->mask, e2->mask))) + return ret; } return 0; }