From 61de8e62c97ff93af3f5b3e5befe7fe9555637ab Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 23 Sep 2021 05:45:01 +0300 Subject: [PATCH 32/32] advance_index_iterate(): Move advance_count() call outside the loop See osdn #42883 Signed-off-by: Marko Lindqvist --- common/tech.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/tech.h b/common/tech.h index 0aebe27fc4..6d424e33c9 100644 --- a/common/tech.h +++ b/common/tech.h @@ -229,7 +229,8 @@ void techs_precalc_data(void); #define advance_index_iterate(_start, _index) \ { \ Tech_type_id _index = (_start); \ - for (; _index < advance_count(); _index++) { + Tech_type_id _aco_##_index = advance_count(); \ + for (; _index < _aco_##_index; _index++) { #define advance_index_iterate_end \ } \ -- 2.33.0