任务单 #44019

city_size_add(): Use 'size' variable

开放日期: 2022-03-04 16:35 最后更新: 2022-03-20 08:30

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
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().

任务单历史 (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
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
2022-03-20 08:30 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

Please login to add comment to this ticket » 登录名