[PR #1899] [MERGED] - moving string parameter into data member instead of copying it. #24696

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1899
Author: @yves-dolce
Created: 7/10/2019
Status: ✅ Merged
Merged: 8/6/2019
Merged by: @DHowett-MSFT

Base: master ← Head: master


📝 Commits (3)

📊 Changes

7 files changed (+25 additions, -20 deletions)

View changed files

📝 src/cascadia/TerminalApp/App.cpp (+8 -7)
📝 src/cascadia/TerminalApp/CascadiaSettings.cpp (+1 -1)
📝 src/cascadia/TerminalApp/ColorScheme.cpp (+2 -1)
📝 src/cascadia/TerminalApp/Profile.cpp (+10 -8)
📝 src/cascadia/TerminalApp/Profile.h (+1 -1)
📝 src/cascadia/TerminalSettings/TerminalSettings.cpp (+2 -1)
📝 src/cascadia/WindowsTerminal/WindowsTerminal.manifest (+1 -1)

📄 Description

  • removing noexcept from methods where an exception could be raised.
    If std::terminate() call is desired instead, I guess those should be
    left and std::move_if_noexcept() used to document the fact that it's
    on purpose.
  • std::move local variable into argument when possible.
  • change maxversiontested XML element to maxVersionTested.
  • used of gsl::narrow_cast where appropriate to prevent warnings.
  • fixed bug in TerminalSettings::SetColorTableEntry()

Summary of the Pull Request

References

PR Checklist

  • Closes Feature Request: Remember window position/size (#1844)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed


🔄 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/1899 **Author:** [@yves-dolce](https://github.com/yves-dolce) **Created:** 7/10/2019 **Status:** ✅ Merged **Merged:** 8/6/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`83896b0`](https://github.com/microsoft/terminal/commit/83896b0de5711415022cbec8927fe7b558315a7b) - moving string parameter into data member instead of copying it. - [`68e1230`](https://github.com/microsoft/terminal/commit/68e123019e24c990774e87ff864bf7e5ecc3d4b6) PR 1899 comments - [`12f71fb`](https://github.com/microsoft/terminal/commit/12f71fb25fa57284b20126e49537e51e9edf1446) Merge branch 'master' of https://github.com/microsoft/terminal ### 📊 Changes **7 files changed** (+25 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/App.cpp` (+8 -7) 📝 `src/cascadia/TerminalApp/CascadiaSettings.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/ColorScheme.cpp` (+2 -1) 📝 `src/cascadia/TerminalApp/Profile.cpp` (+10 -8) 📝 `src/cascadia/TerminalApp/Profile.h` (+1 -1) 📝 `src/cascadia/TerminalSettings/TerminalSettings.cpp` (+2 -1) 📝 `src/cascadia/WindowsTerminal/WindowsTerminal.manifest` (+1 -1) </details> ### 📄 Description - removing `noexcept` from methods where an exception could be raised. If `std::terminate()` call is desired instead, I guess those should be left and `std::move_if_noexcept()` used to document the fact that it's on purpose. - `std::move` local variable into argument when possible. - change `maxversiontested` XML element to `maxVersionTested`. - used of `gsl::narrow_cast` where appropriate to prevent warnings. - fixed bug in `TerminalSettings::SetColorTableEntry()` <!-- 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 <!-- 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 * [ ] Closes #1844 * [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- 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 --- <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:04:49 +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#24696