From a5d9724d88ccc26ab4a4dacf21c3fa09f349950d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Lach?= <slawek@lach.art.pl> Date: Wed, 9 Feb 2022 18:03:52 +0100 Subject: [PATCH] - Introduce city's counter iterration --- common/counters.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/counters.h b/common/counters.h index ec7c1a3683..41943e522b 100644 --- a/common/counters.h +++ b/common/counters.h @@ -48,6 +48,16 @@ int counter_index(struct counter *pcount); struct counter *counter_by_index(int index, enum counter_target target); int counters_get_city_counters_count(void); + +#define city_counters_iterrate(pcount) { \ + int _i; \ + struct counter * pcount; \ + for (_i = 0; _i < counters_get_city_counters_count(); _i++) { \ + pcount = counter_by_index(_i, CTGT_CITY); + +#define city_counters_iterrate_end } \ + } + #ifdef __cplusplus } #endif /* __cplusplus */ -- 2.35.1