microsoft/Terminal

Remove usages of old safe math

Open

#4,153 创建于 2020年1月8日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)C++ (3,212 fork)batch import
Area-CodeHealthHelp WantedIssue-TaskProduct-ConhostProduct-Conpty

仓库指标

Star
 (35,764 star)
PR 合并指标
 (平均合并 27天 19小时) (30 天内合并 24 个 PR)

描述

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

贡献者指南