From 9b983850e7689bd65a5441fcfcd2367e88f2f855 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 28 Apr 2023 22:23:36 +0300 Subject: [PATCH 21/21] Fix build with clang Revert part of osdn #47901 "AI: Correct equality tests between float adv_want values" Variables on the reverted part are not floats in S3_0. See osdn #47957 Signed-off-by: Marko Lindqvist --- ai/default/daimilitary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai/default/daimilitary.c b/ai/default/daimilitary.c index 76c9bcc2fa..accb0c9c0f 100644 --- a/ai/default/daimilitary.c +++ b/ai/default/daimilitary.c @@ -801,7 +801,7 @@ bool dai_process_defender_want(struct ai_type *ait, struct player *pplayer, if ((best_unit_cost > limit_cost && build_cost < best_unit_cost) || ((desire > best || - (ADV_WANTS_EQ(desire, best) + (desire == best && build_cost <= best_unit_cost)) && (best_unit_type == NULL /* In case all units are more expensive than limit_cost */ -- 2.39.2