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

Make example user Printf() impl understandable #355

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

sksat
Copy link
Member

@sksat sksat commented Jun 3, 2024

概要

  • #ifndef SILS_FW ではなく #ifdef SILS_FW にする
    • 真に「SILS_FW が define されていない時」のみの分岐を行いたいのであればこれでもよいが、そうではない
    • #else もあるので、このコードを読む時は正確には「「SILS_FW が define されていない時」でない時」を考えなければならず、confusing
  • tt_printf() などというモノは普通存在しないため、あくまで実機用の実装のテンプレートであることを明示する

影響範囲

  • example user の Printf() の実装の書き方が少し変わる
    • 単にわかりやすさのための変更なので、既存の user が追従する必要はない

@sksat sksat added documentation Improvements or additions to documentation enhancement New feature or request invalid This doesn't seem right labels Jun 3, 2024
@sksat sksat requested review from tarotene and ToshiAki64 June 3, 2024 19:25
@sksat sksat self-assigned this Jun 3, 2024
@sksat sksat force-pushed the feature/make-Printf-understandable branch from 47fe3b9 to ff06132 Compare June 3, 2024 19:57
Copy link
Collaborator

@ToshiAki64 ToshiAki64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かに、分かりやすさは、だいぶ上がっていそう。

Copy link
Contributor

@tarotene tarotene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ifndef だけど case 文的に複数の実装振り回すだけなら明らかに ifdef の方が素直ですね

@sksat
Copy link
Member Author

sksat commented Jun 24, 2024

CI がコケてるのは #334 で直っているはずなので rebase

@sksat sksat force-pushed the feature/make-Printf-understandable branch from ff06132 to d50d30a Compare June 24, 2024 04:18
@sksat sksat merged commit 9964ab1 into main Jun 24, 2024
37 checks passed
@sksat sksat deleted the feature/make-Printf-understandable branch June 24, 2024 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request invalid This doesn't seem right
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants