[PR #5152] [CLOSED] Use modern loops #26147

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

📋 Pull Request Information

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

Base: masterHead: looptime


📝 Commits (8)

📊 Changes

21 files changed (+204 additions, -115 deletions)

View changed files

📝 src/buffer/out/AttrRow.cpp (+2 -4)
📝 src/buffer/out/ut_textbuffer/TextAttributeTests.cpp (+1 -2)
📝 src/cascadia/TerminalAzBridge/ConsoleInputReader.cpp (+4 -4)
📝 src/host/convarea.cpp (+1 -3)
📝 src/host/ft_host/API_DimensionsTests.cpp (+4 -4)
📝 src/host/getset.cpp (+3 -3)
📝 src/host/init.cpp (+4 -4)
📝 src/host/output.cpp (+1 -2)
📝 src/host/screenInfo.cpp (+124 -0)
📝 src/host/telemetry.cpp (+2 -2)
📝 src/host/ut_host/AttrRowTests.cpp (+9 -15)
📝 src/host/ut_host/DbcsTests.cpp (+3 -3)
📝 src/host/ut_host/InputBufferTests.cpp (+11 -11)
📝 src/host/ut_host/TextBufferTests.cpp (+1 -3)
📝 src/interactivity/win32/consoleKeyInfo.cpp (+20 -37)
📝 src/renderer/dx/CustomTextLayout.cpp (+1 -4)
📝 src/renderer/vt/tracing.cpp (+3 -2)
📝 src/terminal/parser/telemetry.cpp (+2 -2)
📝 src/terminal/parser/ut_parser/InputEngineTest.cpp (+3 -3)
📝 src/tools/vtpipeterm/main.cpp (+3 -5)

...and 1 more files

📄 Description

Summary of the Pull Request

I converted many of the older loops to the modern one, which is much shorter and is easier to understand.

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 Testing

🔄 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/5152 **Author:** [@ghost](https://github.com/ghost) **Created:** 3/28/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `looptime` --- ### 📝 Commits (8) - [`d514125`](https://github.com/microsoft/terminal/commit/d5141255347d6b2190f4d43ed490e015788ca0c5) Modernize Loops - [`413bba0`](https://github.com/microsoft/terminal/commit/413bba0ee5f397e2ea0a2a946cf34edf3f57b637) Update telemetry.cpp - [`141bd78`](https://github.com/microsoft/terminal/commit/141bd788dcce81d1a00fb635bd14adc4b3cb0a03) Update telemetry.cpp - [`483960e`](https://github.com/microsoft/terminal/commit/483960eb7b9afceb4594c2a79a2113c09ed88ddc) Update Message_KeyPressTests.cpp - [`d9dc246`](https://github.com/microsoft/terminal/commit/d9dc24605147497cccb1e7c7578fb663e7389713) Revert "Update telemetry.cpp" - [`fe5c1c6`](https://github.com/microsoft/terminal/commit/fe5c1c6ba2d2636c408cb087bb046eacb5860376) Update telemetry.cpp - [`f10379c`](https://github.com/microsoft/terminal/commit/f10379c8484131b142d9b2f319877174e44f1d38) Update telemetry.cpp - [`ea6afc1`](https://github.com/microsoft/terminal/commit/ea6afc156e8ad53c2e1c9215041252d1c53254ba) Update telemetry.cpp ### 📊 Changes **21 files changed** (+204 additions, -115 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/AttrRow.cpp` (+2 -4) 📝 `src/buffer/out/ut_textbuffer/TextAttributeTests.cpp` (+1 -2) 📝 `src/cascadia/TerminalAzBridge/ConsoleInputReader.cpp` (+4 -4) 📝 `src/host/convarea.cpp` (+1 -3) 📝 `src/host/ft_host/API_DimensionsTests.cpp` (+4 -4) 📝 `src/host/getset.cpp` (+3 -3) 📝 `src/host/init.cpp` (+4 -4) 📝 `src/host/output.cpp` (+1 -2) 📝 `src/host/screenInfo.cpp` (+124 -0) 📝 `src/host/telemetry.cpp` (+2 -2) 📝 `src/host/ut_host/AttrRowTests.cpp` (+9 -15) 📝 `src/host/ut_host/DbcsTests.cpp` (+3 -3) 📝 `src/host/ut_host/InputBufferTests.cpp` (+11 -11) 📝 `src/host/ut_host/TextBufferTests.cpp` (+1 -3) 📝 `src/interactivity/win32/consoleKeyInfo.cpp` (+20 -37) 📝 `src/renderer/dx/CustomTextLayout.cpp` (+1 -4) 📝 `src/renderer/vt/tracing.cpp` (+3 -2) 📝 `src/terminal/parser/telemetry.cpp` (+2 -2) 📝 `src/terminal/parser/ut_parser/InputEngineTest.cpp` (+3 -3) 📝 `src/tools/vtpipeterm/main.cpp` (+3 -5) _...and 1 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 I converted many of the older loops to the modern one, which is much shorter and is easier to understand. <!-- 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 Testing --- <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:16 +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#26147