From e7a66208bf1e53f5ac7afa2ac8ead6628e853f57 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 17 Feb 2023 19:16:48 +0200 Subject: [PATCH 27/27] AI: Rename aiunit.[ch] as daiunit.[ch] Drop daiunit.h includes where they are not needed See osdn #47388 Signed-off-by: Marko Lindqvist --- ai/classic/classicai.c | 1 - ai/default/Makefile.am | 6 +++--- ai/default/aiair.c | 1 - ai/default/aidiplomat.c | 1 - ai/default/aiferry.c | 1 - ai/default/aiguard.c | 3 +-- ai/default/aihand.c | 1 - ai/default/aihunt.c | 1 - ai/default/aiparatrooper.c | 1 - ai/default/aitools.c | 1 - ai/default/aitools.h | 2 +- ai/default/daicity.c | 1 - ai/default/daidata.c | 2 +- ai/default/daidiplomacy.c | 1 - ai/default/daidomestic.c | 1 - ai/default/dailog.c | 2 +- ai/default/daimilitary.c | 1 - ai/default/daisettler.c | 1 - ai/default/{aiunit.c => daiunit.c} | 2 +- ai/default/{aiunit.h => daiunit.h} | 6 +++--- meson.build | 2 +- 21 files changed, 12 insertions(+), 26 deletions(-) rename ai/default/{aiunit.c => daiunit.c} (99%) rename ai/default/{aiunit.h => daiunit.h} (98%) diff --git a/ai/classic/classicai.c b/ai/classic/classicai.c index 06eb4905f5..a90d77658d 100644 --- a/ai/classic/classicai.c +++ b/ai/classic/classicai.c @@ -27,7 +27,6 @@ #include "aiferry.h" #include "aihand.h" #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daidata.h" #include "daidiplomacy.h" diff --git a/ai/default/Makefile.am b/ai/default/Makefile.am index 7617ae53c9..f0413f6c10 100644 --- a/ai/default/Makefile.am +++ b/ai/default/Makefile.am @@ -32,8 +32,6 @@ libdefaultai_la_SOURCES = \ aitech.h \ aitools.c \ aitools.h \ - aiunit.c \ - aiunit.h \ daiactions.c \ daiactions.h \ daicity.c \ @@ -53,7 +51,9 @@ libdefaultai_la_SOURCES = \ daiplayer.c \ daiplayer.h \ daisettler.c \ - daisettler.h + daisettler.h \ + daiunit.c \ + daiunit.h libdefaultai_la_LIBADD = -lm diff --git a/ai/default/aiair.c b/ai/default/aiair.c index 760b28cea5..a950e9e447 100644 --- a/ai/default/aiair.c +++ b/ai/default/aiair.c @@ -43,7 +43,6 @@ /* ai/default */ #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daiplayer.h" diff --git a/ai/default/aidiplomat.c b/ai/default/aidiplomat.c index 4134d416da..f30c9cc988 100644 --- a/ai/default/aidiplomat.c +++ b/ai/default/aidiplomat.c @@ -64,7 +64,6 @@ #include "aiguard.h" #include "aihand.h" #include "aitools.h" -#include "aiunit.h" #include "daiactions.h" #include "daicity.h" #include "daidata.h" diff --git a/ai/default/aiferry.c b/ai/default/aiferry.c index 426cb13517..9228de5662 100644 --- a/ai/default/aiferry.c +++ b/ai/default/aiferry.c @@ -48,7 +48,6 @@ /* ai/default */ #include "aiguard.h" #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daidata.h" #include "daiplayer.h" diff --git a/ai/default/aiguard.c b/ai/default/aiguard.c index 9744d76740..e13a4704c0 100644 --- a/ai/default/aiguard.c +++ b/ai/default/aiguard.c @@ -25,9 +25,8 @@ /* server */ #include "srv_log.h" -/* ai */ +/* ai/default */ #include "aitools.h" -#include "aiunit.h" #include "dailog.h" #include "daiplayer.h" diff --git a/ai/default/aihand.c b/ai/default/aihand.c index d26bd3b54a..76ea513b9c 100644 --- a/ai/default/aihand.c +++ b/ai/default/aihand.c @@ -56,7 +56,6 @@ /* ai/default */ #include "aitech.h" #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daidata.h" #include "daidiplomacy.h" diff --git a/ai/default/aihunt.c b/ai/default/aihunt.c index c45425ddff..76b55b536d 100644 --- a/ai/default/aihunt.c +++ b/ai/default/aihunt.c @@ -50,7 +50,6 @@ /* ai/default */ #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daiplayer.h" diff --git a/ai/default/aiparatrooper.c b/ai/default/aiparatrooper.c index 32a5c700db..95488d1f51 100644 --- a/ai/default/aiparatrooper.c +++ b/ai/default/aiparatrooper.c @@ -46,7 +46,6 @@ #include "handicaps.h" /* ai/default */ -#include "aiunit.h" #include "aitools.h" #include "daicity.h" #include "daidata.h" diff --git a/ai/default/aitools.c b/ai/default/aitools.c index a2baa9a550..15920cddcc 100644 --- a/ai/default/aitools.c +++ b/ai/default/aitools.c @@ -63,7 +63,6 @@ #include "aiferry.h" #include "aiguard.h" #include "aitech.h" -#include "aiunit.h" #include "daidata.h" #include "dailog.h" #include "daimilitary.h" diff --git a/ai/default/aitools.h b/ai/default/aitools.h index d60d7d0d02..4a5d7ad2bc 100644 --- a/ai/default/aitools.h +++ b/ai/default/aitools.h @@ -20,7 +20,7 @@ #include "advchoice.h" /* ai/default */ -#include "aiunit.h" /* enum ai_unit_task */ +#include "daiunit.h" /* enum ai_unit_task */ struct pf_path; struct pf_parameter; diff --git a/ai/default/daicity.c b/ai/default/daicity.c index f16f817257..0f02571104 100644 --- a/ai/default/daicity.c +++ b/ai/default/daicity.c @@ -54,7 +54,6 @@ /* ai/default */ #include "aihand.h" #include "aitools.h" -#include "aiunit.h" #include "daidata.h" #include "daidiplomacy.h" #include "daidomestic.h" diff --git a/ai/default/daidata.c b/ai/default/daidata.c index d96632bb27..0e5a413bc5 100644 --- a/ai/default/daidata.c +++ b/ai/default/daidata.c @@ -34,12 +34,12 @@ /* ai/default */ #include "aiferry.h" -#include "aiunit.h" #include "daicity.h" #include "daidiplomacy.h" #include "daieffects.h" #include "daiplayer.h" #include "daisettler.h" +#include "daiunit.h" #include "daidata.h" diff --git a/ai/default/daidiplomacy.c b/ai/default/daidiplomacy.c index c99c3ef11d..d18ce08357 100644 --- a/ai/default/daidiplomacy.c +++ b/ai/default/daidiplomacy.c @@ -56,7 +56,6 @@ #include "handicaps.h" /* ai/default */ -#include "aiunit.h" #include "aitools.h" #include "daicity.h" #include "daidata.h" diff --git a/ai/default/daidomestic.c b/ai/default/daidomestic.c index 8cb528225a..6d220e22c1 100644 --- a/ai/default/daidomestic.c +++ b/ai/default/daidomestic.c @@ -55,7 +55,6 @@ /* ai/default */ #include "aitech.h" #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daidata.h" #include "daimilitary.h" diff --git a/ai/default/dailog.c b/ai/default/dailog.c index c10359323e..5e7148ca83 100644 --- a/ai/default/dailog.c +++ b/ai/default/dailog.c @@ -27,10 +27,10 @@ #include "notify.h" /* ai/default */ -#include "aiunit.h" #include "daicity.h" #include "daidata.h" #include "daiplayer.h" +#include "daiunit.h" #include "dailog.h" diff --git a/ai/default/daimilitary.c b/ai/default/daimilitary.c index 383d53ba9c..f10c3167d6 100644 --- a/ai/default/daimilitary.c +++ b/ai/default/daimilitary.c @@ -62,7 +62,6 @@ #include "aiparatrooper.h" #include "aitech.h" #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daidata.h" #include "daieffects.h" diff --git a/ai/default/daisettler.c b/ai/default/daisettler.c index 6434ba3101..33517a1e7f 100644 --- a/ai/default/daisettler.c +++ b/ai/default/daisettler.c @@ -57,7 +57,6 @@ /* ai/default */ #include "aiferry.h" #include "aitools.h" -#include "aiunit.h" #include "daicity.h" #include "daidata.h" #include "dailog.h" diff --git a/ai/default/aiunit.c b/ai/default/daiunit.c similarity index 99% rename from ai/default/aiunit.c rename to ai/default/daiunit.c index 294922ca1e..2806b8cc1b 100644 --- a/ai/default/aiunit.c +++ b/ai/default/daiunit.c @@ -81,7 +81,7 @@ #include "daimilitary.h" #include "daiplayer.h" -#include "aiunit.h" +#include "daiunit.h" #define LOGLEVEL_RECOVERY LOG_DEBUG diff --git a/ai/default/aiunit.h b/ai/default/daiunit.h similarity index 98% rename from ai/default/aiunit.h rename to ai/default/daiunit.h index 502381e0ad..ce11e91423 100644 --- a/ai/default/aiunit.h +++ b/ai/default/daiunit.h @@ -10,8 +10,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ***********************************************************************/ -#ifndef FC__AIUNIT_H -#define FC__AIUNIT_H +#ifndef FC__DAIUNIT_H +#define FC__DAIUNIT_H /* common */ #include "combat.h" @@ -165,4 +165,4 @@ bool dai_unit_can_strike_my_unit(const struct unit *attacker, void dai_switch_to_explore(struct ai_type *ait, struct unit *punit, struct tile *target, enum override_bool *allow); -#endif /* FC__AIUNIT_H */ +#endif /* FC__DAIUNIT_H */ diff --git a/meson.build b/meson.build index 32f485eecc..bac8da1423 100644 --- a/meson.build +++ b/meson.build @@ -991,7 +991,6 @@ ais = static_library('fc_ai', 'ai/default/aiparatrooper.c', 'ai/default/aitech.c', 'ai/default/aitools.c', - 'ai/default/aiunit.c', 'ai/default/daiactions.c', 'ai/default/daicity.c', 'ai/default/daidata.c', @@ -1002,6 +1001,7 @@ ais = static_library('fc_ai', 'ai/default/daimilitary.c', 'ai/default/daiplayer.c', 'ai/default/daisettler.c', + 'ai/default/daiunit.c', sources: [verhdr], include_directories: [server_inc, include_directories('ai/default')] ) -- 2.39.1