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

インデックス範囲チェックの重複を削減 #1964

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

beru
Copy link
Contributor

@beru beru commented Jul 15, 2024

PR対象

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

カテゴリ

  • 改善

PR の背景

CStringRef::At メソッド link はチェック処理を行うため、頻繁に呼び出しが行われる箇所で使うのには適していません。そこでチェック処理を行わない CStringRef::operator [] メソッドを追加しました。

事前にインデックスの範囲チェックが行われている箇所で、CStringRef::At メソッドの代わりに CStringRef::operator [] メソッドを使用するように変更しました。

仕様・動作説明

PR の影響範囲

テスト内容

関連 issue, PR

参考資料

… [] メソッドを追加

CStringRef::At メソッドの代わりに新規追加した CStringRef::operator [] メソッドを使用
@beru beru added the 🚅 speed up 🚀 高速化 label Jul 15, 2024
@beru beru self-assigned this Jul 15, 2024
Copy link

sonarcloud bot commented Jul 15, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
32.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@AppVeyorBot
Copy link

Build sakura 1.0.4360 completed (commit 3563859c34 by @beru)

@beru
Copy link
Contributor Author

beru commented Jul 16, 2024

レビューありがとうございました。Mergeします。もし問題が見つかったら別PRで対処します。

@beru beru merged commit ea735b6 into sakura-editor:master Jul 16, 2024
23 of 24 checks passed
@beru beru deleted the reduce_redundant_index_check branch July 16, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants