Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types.hとtypes.cppで冗長なコードを整理し、空白やインデントを微調整 #280

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

KazApps
Copy link
Contributor

@KazApps KazApps commented Jul 29, 2024

  • d1 ? d1 == Effect8::directions_of(sq2, sq3) : falseをd1 && d1 == Effect8::directions_of(sq2, sq3)に式を簡略化。
  • std::string((pc & 32) ? "D":"") ではstring型にする必要はないため、(pc & 32) ? "D":""に変更。
  • FOUND:;の不要なセミコロンを削除。
  • 空白やインデントを微調整。

@KazApps KazApps changed the title types.hとtypes.cppで冗長なコードを整理した。 types.hとtypes.cppで冗長なコードを整理し、bitboard.cppのインデントを修正した。 Aug 6, 2024
@KazApps KazApps changed the title types.hとtypes.cppで冗長なコードを整理し、bitboard.cppのインデントを修正した。 types.hとtypes.cppで冗長なコードを整理し、bitboard.cppのインデントを修正 Aug 6, 2024
@KazApps KazApps changed the title types.hとtypes.cppで冗長なコードを整理し、bitboard.cppのインデントを修正 types.hとtypes.cppで冗長なコードを整理し、空白やインデントを微調整 Aug 6, 2024
@yaneurao
Copy link
Owner

yaneurao commented Aug 9, 2024

FOUND:;の不要なセミコロンを削除。

これ不要ではあるんですが、C/C++の文法上、ラベル: のあと、statementが来ないといけなくて、例えば、ブロックの末尾であるような場合などで、statementが来てなくてエラーとなるのが気持ち悪くて、おまじないのように必ず入れてあります。(gotoしたいラベルを置きたい場所はたいていブロックの末尾なので..)

なのでこれは消さないでいただきたいです。

@KazApps
Copy link
Contributor Author

KazApps commented Aug 9, 2024

そんな事情があったんですね...
FOUND:;の部分は元に戻しておきました。

@yaneurao yaneurao merged commit 2266fb6 into yaneurao:master Aug 9, 2024
182 checks passed
@yaneurao
Copy link
Owner

yaneurao commented Aug 9, 2024

プルリクありがとうございました🙇

@KazApps KazApps deleted the cleanup-code branch August 20, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants