[Freeciv-tickets] [freeciv] #41115: Counter getter functions

アーカイブの一覧に戻る
OSDN Ticket System norep****@osdn*****
Wed Aug 11 01:44:48 JST 2021


#41115: Counter getter functions

  Open Date: 2021-01-08 05:46
Last Update: 2021-08-11 01:44

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/41115
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41115

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-08-11 01:44 Updated by: Anonymous

Comment:

Reply To kvilhaugsvik
1. When you make a change please explain what you did and why you did it

2. Why the coding style change to the definition of countersMAX_COUNTERS? (You "save a line" by moving the "{" to after the =) Is it even correct? By correct I mean: you can point to something in doc/CodingStyle, not that you personally like it better. Remember that the coding style is to make the code base consistent so it is readable by all that know the style, not what an individual developer considers pretty.

3. Why indent various stuff in conters.h that shouldn't be indented according to the coding style? A merge conflict you resolved manually and too quick? A "helpful" tool?

4. Why convert spaces to tabs before comments?

5. Why did you remove counter id? It is just an int. It is about a rule set defined counter type so there will only be one of it per counter rule.

Hint: when something is done many other places in the code base it probably follows the coding style. Don't "fix it", at least not without asking.
I will respond in few days. I have use some tool to automatically format C code (probably set coding style in KDevelop and reformat files).

---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: kvilhaugsvik
          Type: Patches
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.2.0
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

These functions will be needed for building anything on counters module:
struct counter *counter_by_id(int id)
int counter_id(struct counter *pcount)
struct counter *counter_by_rule_name(const char *name)
const char *counter_rule_name(struct counter *pcount)
int counter_index(struct counter *pcount)
struct counter *counter_by_index(int index, enum counter_target target)

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/41115
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41115



More information about the Freeciv-tickets mailing list
アーカイブの一覧に戻る