refactor: CODING_STYLE準拠の型修正(int→int_fast16_t/int16_t/int_fixed等)#308
Merged
Conversation
AffinePrecomputed, SinkNode, SourceNodeの固定小数点値を int32_t → int_fixedに変更。int_fixedはint32_tのエイリアスのため バイナリ互換性に影響なし。型名で意図を明確化。
CODING_STYLE.mdに従い、関数引数はint→int_fast16_t、 構造体メンバはint→int16_tに統一。対象: viewport, image_buffer, pixel_format, render_types, renderer_node, blur nodes, matte_node, node, distributor_node, ninepatch_source_node, canvas_utils, perf_metrics
auto + static_cast<int_fast16_t>(...)パターンでローカル変数を統一。 ループカウンタは終端変数の型に一致させた。対象: matte_node, vertical/horizontal_blur_node, renderer_node, sink_node, canvas_utils, filters, image_buffer, viewport, node
EntryPool/RenderContextのループカウンタをuint_fast8_tに統一、 FormatMetrics定数をuint_fast8_tに、PoolAllocator探索をsize_tに、 PerfMetricsのcount系メンバをuint32_tに修正。CHANGELOGに記載追加。
FormatIdx/OpType定数のuint_fast8_t化に伴うbindings.cppのループカウンタ修正、 canvas_utils.hのtoStraight呼び出し時のint_fast16_t→size_tキャスト追加。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
フェーズ1: 固定小数点メンバを
int_fixed型に統一int32_t→int_fixedに変更フェーズ2: 関数引数・メンバ変数の型修正
int→int_fast16_t(14ファイル)int→int16_t(RendererNode, BlurNode, MatteNode 等)フェーズ3: ローカル変数・ループカウンタの型修正
auto + static_cast<int_fast16_t>(...)パターンでローカル変数を統一フェーズ4: 配列インデックス・メトリクス型の整理
uint_fast8_tに統一uint_fast8_tに変更size_tに統一uint32_tに統一Test plan
cd fleximg/test && make clean && make all_tests && ./all_tests— 160テスト全パス (67718 assertions)./build.sh) — 成功./build.sh --debug) — 成功