[PR #4144] Introduce chromium safe math #25664

Open
opened 2026-01-31 09:10:57 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4144

State: closed
Merged: Yes


Summary of the Pull Request

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • Can we remove min/max completely or rename it in the two projects where it had to be reintroduced? This is now moved into #4152
  • How many usages of the old safe math are there? 79
  • If not a ton, can we migrate them here or in a follow on PR? This is now moved into #4153

Files with old safe math:

  • TerminalControl: TSFInputControl.cpp
  • TerminalCore: TerminalDispatch.cpp
  • TerminalCore: TerminalSelection.cpp
  • Host: directio.cpp
  • RendererGdi: invalidate.cpp
  • RendererGdi: math.cpp
  • RendererGdi: paint.cpp
  • RendererVt: paint.cpp
  • TerminalAdapter: adaptDispatch.cpp
  • Types: viewport.cpp
  • Types: WindowUiaProviderBase.cpp

Validation Steps Performed

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4144 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #4013 * [x] I work here. * [x] Existing tests should be OK. Real changes, just adding a lib to use. * [x] Couldn't find any existing docs about intsafe. * [x] Am core contributor. ## Detailed Description of the Pull Request / Additional comments * [x] Can we remove min/max completely or rename it in the two projects where it had to be reintroduced? This is now moved into #4152 * [x] How many usages of the old safe math are there? **79** * [x] If not a ton, can we migrate them here or in a follow on PR? This is now moved into #4153 Files with old safe math: - TerminalControl: TSFInputControl.cpp - TerminalCore: TerminalDispatch.cpp - TerminalCore: TerminalSelection.cpp - Host: directio.cpp - RendererGdi: invalidate.cpp - RendererGdi: math.cpp - RendererGdi: paint.cpp - RendererVt: paint.cpp - TerminalAdapter: adaptDispatch.cpp - Types: viewport.cpp - Types: WindowUiaProviderBase.cpp ## Validation Steps Performed
claunia added the pull-request label 2026-01-31 09:10:57 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25664