Ticket #44019

city_size_add(): Use 'size' variable

Open Date: 2022-03-04 16:35 Last Update: 2022-03-20 08:30

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

city_size_add() assigns city size to a variable, but then calls city_size_get() again when it needs it. Use the variable instead. This is a really minor optimization, but more importantly it helps in getting rid compiler warning in NDEBUG build; currently 'size' is a set but unused variable outside fc_assert().

Ticket History (3/4 Histories)

2022-03-04 16:35 Updated by: cazfi
  • New Ticket "city_size_add(): Use 'size' variable" created
2022-03-06 05:24 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2022-03-20 08:30 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login