From 49eba5d521f416c4561d3fb788549609bc5d8e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Lach?= Date: Thu, 8 Apr 2021 14:35:30 +0200 Subject: [PATCH] - Code style changes to match Freeciv code rules --- common/counters.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/common/counters.c b/common/counters.c index 2e00027b34..9de1746054 100644 --- a/common/counters.c +++ b/common/counters.c @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** Freeciv - Copyright (C) 2004 - The Freeciv Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,17 +60,17 @@ void counters_free(void) struct counter *counter_by_id(int id) { int i; - + fc_assert_ret_val(id >= MAX_COUNTERS, NULL); - + for (i = 0; i < MAX_COUNTERS; i++) { - + if (counters[i].id == id) { - + return &counters[i]; } } - + return NULL; } @@ -92,15 +92,15 @@ struct counter *counter_by_rule_name(const char *name) int i; fc_assert_ret_val(NULL == name, NULL); fc_assert_ret_val('\0' == name[0], NULL); - + for (i = 0; i < MAX_COUNTERS; i++) { - + if (0 == fc_strcasecmp(name, counters[i].rule_name)) { - + return &counters[i]; } } - + return NULL; } @@ -118,7 +118,7 @@ const char *counter_rule_name(struct counter *pcount) int counter_index(struct counter *pcount) { fc_assert_ret_val(NULL != pcount, -1); - + return pcount->index; } @@ -128,12 +128,12 @@ int counter_index(struct counter *pcount) struct counter *counter_by_index(int index, enum counter_target target) { switch (target) { - + case CTGT_CITY: - + return counters_city[index]; break; - + default: fc_assert_exit_msg(false, "Bad counter type inside counter_by_index. Exiting"); } -- 2.30.2