[PR #12975] [MERGED] Use type inference throughout the project #29311

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12975
Author: @lhecker
Created: 4/24/2022
Status: Merged
Merged: 4/25/2022
Merged by: @undefined

Base: mainHead: dev/lhecker/8000-part0


📝 Commits (3)

  • 5b0a42f Standardize pointer/reference alignment
  • 8068696 Use type inference wherever possible
  • a467640 Address feedback

📊 Changes

435 files changed (+4759 additions, -4759 deletions)

View changed files

📝 .clang-format (+1 -1)
📝 src/buffer/out/CharRow.cpp (+3 -3)
📝 src/buffer/out/CharRowCellReference.cpp (+1 -1)
📝 src/buffer/out/LineRendition.hpp (+1 -1)
📝 src/buffer/out/OutputCellIterator.cpp (+2 -2)
📝 src/buffer/out/Row.cpp (+3 -3)
📝 src/buffer/out/TextAttribute.cpp (+3 -3)
📝 src/buffer/out/search.cpp (+3 -3)
📝 src/buffer/out/textBuffer.cpp (+70 -70)
📝 src/buffer/out/textBufferCellIterator.cpp (+7 -7)
📝 src/buffer/out/ut_textbuffer/TextAttributeTests.cpp (+11 -11)
📝 src/buffer/out/ut_textbuffer/TextColorTests.cpp (+2 -2)
📝 src/buffer/out/ut_textbuffer/UnicodeStorageTests.cpp (+2 -2)
📝 src/cascadia/LocalTests_SettingsModel/ColorSchemeTests.cpp (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/CommandTests.cpp (+8 -8)
📝 src/cascadia/LocalTests_SettingsModel/DeserializationTests.cpp (+3 -3)
📝 src/cascadia/LocalTests_SettingsModel/JsonTestClass.h (+1 -1)
📝 src/cascadia/LocalTests_SettingsModel/TerminalSettingsTests.cpp (+2 -2)
📝 src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp (+12 -12)
📝 src/cascadia/LocalTests_TerminalApp/CppWinrtTailored.h (+2 -2)

...and 80 more files

📄 Description

#4015 requires sweeping changes in order to allow a migration of our buffer
coordinates from int16_t to int32_t. This commit reduces the size of
future commits by using type inference wherever possible, dropping the
need to manually adjust types throughout the project later.

As an added bonus this commit standardizes the alignment of cv qualifiers
to be always left of the type (e.g. const T& instead of T const&).

The migration to type inference with auto was mostly done
using JetBrains Resharper with some manual intervention and the
standardization of cv qualifier alignment using clang-format 14.

References

This is preparation work for #4015.

Validation Steps Performed

  • Tests pass

🔄 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/12975 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 4/24/2022 **Status:** ✅ Merged **Merged:** 4/25/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/8000-part0` --- ### 📝 Commits (3) - [`5b0a42f`](https://github.com/microsoft/terminal/commit/5b0a42f411cd511147ac2e24e14e77b0678d43ee) Standardize pointer/reference alignment - [`8068696`](https://github.com/microsoft/terminal/commit/80686966dbe6365f1cbd991c5a6272f6c09fddb0) Use type inference wherever possible - [`a467640`](https://github.com/microsoft/terminal/commit/a4676403896a8a34a8daa13bc93112684163f12c) Address feedback ### 📊 Changes **435 files changed** (+4759 additions, -4759 deletions) <details> <summary>View changed files</summary> 📝 `.clang-format` (+1 -1) 📝 `src/buffer/out/CharRow.cpp` (+3 -3) 📝 `src/buffer/out/CharRowCellReference.cpp` (+1 -1) 📝 `src/buffer/out/LineRendition.hpp` (+1 -1) 📝 `src/buffer/out/OutputCellIterator.cpp` (+2 -2) 📝 `src/buffer/out/Row.cpp` (+3 -3) 📝 `src/buffer/out/TextAttribute.cpp` (+3 -3) 📝 `src/buffer/out/search.cpp` (+3 -3) 📝 `src/buffer/out/textBuffer.cpp` (+70 -70) 📝 `src/buffer/out/textBufferCellIterator.cpp` (+7 -7) 📝 `src/buffer/out/ut_textbuffer/TextAttributeTests.cpp` (+11 -11) 📝 `src/buffer/out/ut_textbuffer/TextColorTests.cpp` (+2 -2) 📝 `src/buffer/out/ut_textbuffer/UnicodeStorageTests.cpp` (+2 -2) 📝 `src/cascadia/LocalTests_SettingsModel/ColorSchemeTests.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/CommandTests.cpp` (+8 -8) 📝 `src/cascadia/LocalTests_SettingsModel/DeserializationTests.cpp` (+3 -3) 📝 `src/cascadia/LocalTests_SettingsModel/JsonTestClass.h` (+1 -1) 📝 `src/cascadia/LocalTests_SettingsModel/TerminalSettingsTests.cpp` (+2 -2) 📝 `src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp` (+12 -12) 📝 `src/cascadia/LocalTests_TerminalApp/CppWinrtTailored.h` (+2 -2) _...and 80 more files_ </details> ### 📄 Description #4015 requires sweeping changes in order to allow a migration of our buffer coordinates from `int16_t` to `int32_t`. This commit reduces the size of future commits by using type inference wherever possible, dropping the need to manually adjust types throughout the project later. As an added bonus this commit standardizes the alignment of cv qualifiers to be always left of the type (e.g. `const T&` instead of `T const&`). The migration to type inference with `auto` was mostly done using JetBrains Resharper with some manual intervention and the standardization of cv qualifier alignment using clang-format 14. ## References This is preparation work for #4015. ## Validation Steps Performed * Tests pass ✅ --- <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:34:10 +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#29311