[PR #5147] [CLOSED] Static-casts #26137

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5147
Author: @ghost
Created: 3/27/2020
Status: Closed

Base: masterHead: Clean


📝 Commits (6)

📊 Changes

102 files changed (+581 additions, -581 deletions)

View changed files

📝 src/buffer/out/ut_textbuffer/TextAttributeTests.cpp (+1 -1)
📝 src/buffer/out/ut_textbuffer/TextColorTests.cpp (+2 -2)
📝 src/cascadia/PublicTerminalCore/HwndTerminal.cpp (+2 -2)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+1 -1)
📝 src/cascadia/TerminalConnection/ConptyConnection.cpp (+1 -1)
📝 src/cascadia/TerminalControl/TermControl.cpp (+1 -1)
📝 src/cascadia/UnitTests_TerminalCore/TerminalApiTest.cpp (+1 -1)
📝 src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp (+1 -1)
📝 src/host/CommandListPopup.cpp (+9 -9)
📝 src/host/_stream.cpp (+14 -14)
📝 src/host/cmdline.cpp (+27 -27)
📝 src/host/conattrs.cpp (+3 -3)
📝 src/host/conimeinfo.cpp (+1 -1)
📝 src/host/consoleInformation.cpp (+2 -2)
📝 src/host/dbcs.cpp (+3 -3)
📝 src/host/ft_host/API_AliasTestsHelpers.hpp (+1 -1)
📝 src/host/ft_host/API_BufferTests.cpp (+1 -1)
📝 src/host/ft_host/API_DimensionsTests.cpp (+3 -3)
📝 src/host/ft_host/API_FileTests.cpp (+21 -21)
📝 src/host/ft_host/API_FontTests.cpp (+4 -4)

...and 80 more files

📄 Description

Summary of the Pull Request

A lot of casts are in the C-style, but this is hugely ambiguous to the compiler, which may put some casts at runtime, others during compile time. This applies the stats cast to the primitive data types, or the types that are typedef from a basic data type, as well as reinterpret casts where needed.

References

PR Checklist

  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

  • Unit Tests

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/5147 **Author:** [@ghost](https://github.com/ghost) **Created:** 3/27/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `Clean` --- ### 📝 Commits (6) - [`daa9142`](https://github.com/microsoft/terminal/commit/daa9142e3a6bb6078305fbcb348ae3a02fc474c2) Static cast - [`5cf1040`](https://github.com/microsoft/terminal/commit/5cf104094328c8cc1c3fc1a11a15d5b35b8335d8) Static casts - [`999c826`](https://github.com/microsoft/terminal/commit/999c82692798ffa5347ad7a68741a7e357e57e81) fix - [`219dcd8`](https://github.com/microsoft/terminal/commit/219dcd8c82cb72f9bda238cfbd2b9348a8fb3a52) Format fix - [`724c150`](https://github.com/microsoft/terminal/commit/724c1504798fe646c2331ed5af3ea6922ee9978b) fix - [`365ac8f`](https://github.com/microsoft/terminal/commit/365ac8f49ab983873e5cbd696982795099d22e4a) Update ConPtyTests.cpp ### 📊 Changes **102 files changed** (+581 additions, -581 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/ut_textbuffer/TextAttributeTests.cpp` (+1 -1) 📝 `src/buffer/out/ut_textbuffer/TextColorTests.cpp` (+2 -2) 📝 `src/cascadia/PublicTerminalCore/HwndTerminal.cpp` (+2 -2) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+1 -1) 📝 `src/cascadia/TerminalConnection/ConptyConnection.cpp` (+1 -1) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+1 -1) 📝 `src/cascadia/UnitTests_TerminalCore/TerminalApiTest.cpp` (+1 -1) 📝 `src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp` (+1 -1) 📝 `src/host/CommandListPopup.cpp` (+9 -9) 📝 `src/host/_stream.cpp` (+14 -14) 📝 `src/host/cmdline.cpp` (+27 -27) 📝 `src/host/conattrs.cpp` (+3 -3) 📝 `src/host/conimeinfo.cpp` (+1 -1) 📝 `src/host/consoleInformation.cpp` (+2 -2) 📝 `src/host/dbcs.cpp` (+3 -3) 📝 `src/host/ft_host/API_AliasTestsHelpers.hpp` (+1 -1) 📝 `src/host/ft_host/API_BufferTests.cpp` (+1 -1) 📝 `src/host/ft_host/API_DimensionsTests.cpp` (+3 -3) 📝 `src/host/ft_host/API_FileTests.cpp` (+21 -21) 📝 `src/host/ft_host/API_FontTests.cpp` (+4 -4) _...and 80 more files_ </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request A lot of casts are in the C-style, but this is hugely ambiguous to the compiler, which may put some casts at runtime, others during compile time. This applies the stats cast to the primitive data types, or the types that are typedef from a basic data type, as well as reinterpret casts where needed. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [X] Tests added/passed <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Unit Tests --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:14:12 +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#26137