Skip to content

Conversation

@gorogoro123
Copy link
Contributor

PR対象

  • アプリ(サクラエディタ本体)

カテゴリ

  • 改善

PR の背景

CEditDoc クラスで、メンバ変数をコンストラクタで初期化している。

仕様・動作説明

変数宣言時に初期化するようにします。

PR の影響範囲

影響なし。

テスト内容

変更前後で、 CEditDoc クラスのコンストラクタに break を設定し、メンバ変数を確認する。

関連 issue, PR

#2110
#2134

参考資料

@github-actions
Copy link

Test Results

621 tests  ±0   621 ✅ ±0   1m 34s ⏱️ +11s
 78 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit d4d4dc8. ± Comparison against base commit 73f7d1b.

@sonarqubecloud
Copy link

Copy link
Contributor

@berryzplus berryzplus left a comment

Choose a reason for hiding this comment

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

対応ありがとうございます。

// 編集禁止コマンドの並びをチェック
int i;
for ( i = 0; i < _countof(EIsModificationForbidden) - 1; i++){
for (auto i = 0; i < _countof(EIsModificationForbidden) - 1; i++){
Copy link
Contributor

Choose a reason for hiding this comment

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

指摘ではありません。

せっかく直すならこんな感じが好みです。

Suggested change
for (auto i = 0; i < _countof(EIsModificationForbidden) - 1; i++){
for (size_t i = 0; i < std::size(EIsModificationForbidden); ++i) {

(forループ終了条件の定義ミスをしれっと直そうとしてる点は、実害ないのでスルーして構いません。)

拡張 for に移行すると「より良い」はず。

@berryzplus berryzplus merged commit ce98589 into sakura-editor:master Dec 5, 2025
13 checks passed
@gorogoro123 gorogoro123 deleted the feature/use_in_class_initializer_CEditDoc branch December 6, 2025 01:35
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