microsoft/Terminal

Remove usages of old safe math

オープン

#4,153 opened on 2020/01/08

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (9,275 件のフォーク)batch import
Area-CodeHealthHelp WantedIssue-TaskProduct-ConhostProduct-Conpty

Repository metrics

Stars
 (103,173 個のスター)
PR merge metrics
 (平均マージ 27d 19h) (30d で 24 merged PRs)

説明

There are approximately 79 uses of old safe math. (a.k.a. the LongAdd, ShortAdd, and friends from intsafe.h).

This task represents removing them and transitioning them to an appropriate safe/saturating math function from the chromium safe math library introduced in #4144.

After removing usages of the old safe math functions, also remove the intsafe.h header.

Files with old safe math as of this writing:

  • 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

コントリビューターガイド