チケット #44852

Redundant check in citizens_update()

登録: 2022-06-18 05:28 最終更新: 2022-10-15 12:09

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
修正済み
ファイル:
1

詳細

int selected = fc_rand(count); ... if (selected != count) is always true. That does not change the result (just sometimes we assign a thing to itself) but is redundant.

チケットの履歴 (6 件中 3 件表示)

2022-06-18 05:28 更新者: ihnatus
  • 新しいチケット "Redundant check in citizens_update()" が作成されました
2022-08-05 08:59 更新者: cazfi
2022-10-07 09:30 更新者: cazfi
2022-10-08 11:02 更新者: cazfi
  • 担当者(未割り当て) から cazfi に更新されました
  • 解決法なし から 受領 に更新されました
コメント

Considered adjusting the check to at least to work correctly (use 'count - 1') but went for complete removal in the end. That also allowed integrating previously separate 'count--'.

A bit undecided, but proposing this patch now anyway.

2022-10-15 12:09 更新者: cazfi
  • 状況オープン から 完了 に更新されました
  • 解決法受領 から 修正済み に更新されました

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする