Skip to content

refactor: 関数ポインタ型のint引数をsize_t/int_fast16_tに修正#307

Merged
ainyan03 merged 2 commits into
mainfrom
claude/fleximg-int-type-fix
Feb 7, 2026
Merged

refactor: 関数ポインタ型のint引数をsize_t/int_fast16_tに修正#307
ainyan03 merged 2 commits into
mainfrom
claude/fleximg-int-type-fix

Conversation

@ainyan03
Copy link
Copy Markdown
Owner

@ainyan03 ainyan03 commented Feb 7, 2026

Summary

  • pixel_format.h で定義される関数ポインタ型のパラメータ型を、CODING_STYLE.md に従い int から適切な型に修正
    • ConvertFunc 系(ピクセル変換関数): int pixelCountsize_t pixelCount
    • CopyRowDDA_Func / CopyQuadDDA_Func(DDA転送関数): int countint_fast16_t count
    • LineFilterFunc(ラインフィルタ関数): int countint_fast16_t count
  • 対象12ファイルの実装関数・ローカル変数も型を統一

対象ファイル(12ファイル)

ファイル 変更内容
pixel_format.h 関数ポインタ型定義、forward宣言、lut8toNテンプレート
dda.h DDA全テンプレート関数・ラッパー関数・ローカル変数
rgba8_straight.h toStraight/fromStraight/blendUnder
rgb565.h LE/BE toStraight/fromStraight, swap16
rgb888.h RGB/BGR toStraight/fromStraight, swap24
rgb332.h toStraight/fromStraight
alpha8.h toStraight/fromStraight
grayscale8.h toStraight/fromStraight
index.h unpack/pack/expand/toStraight/fromStraight
format_converter.h fcv_*関数、applyColorKey
viewport.h copyRowDDA/copyRowDDABilinear
filters.h LineFilterFunc型、brightness/grayscale/alpha_line

Test plan

  • リリースビルド(./build.sh)— 成功
  • デバッグビルド(./build.sh --debug)— 成功
  • テスト(make all_tests && ./all_tests)— 160テスト、67718アサーション全パス

- ConvertFunc系(pixelCount): int → size_t(バッファサイズの意味合い)
- DDA系(count): int → int_fast16_t(ビューポート幅由来の座標寸法)
- LineFilterFunc(count): int → int_fast16_t(スキャンライン幅由来)
- 対応する実装関数・ローカル変数・ループカウンタも統一
@ainyan03 ainyan03 merged commit f8d393d into main Feb 7, 2026
5 checks passed
@ainyan03 ainyan03 deleted the claude/fleximg-int-type-fix branch February 7, 2026 21:37
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.

1 participant