[PR #3806] [MERGED] GetGuid noexcept Fix #25510

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3806
Author: @mkitzan
Created: 12/2/2019
Status: Merged
Merged: 12/3/2019
Merged by: @undefined

Base: masterHead: getguid-noexcept-fix


📝 Commits (10+)

📊 Changes

4 files changed (+23 additions, -15 deletions)

View changed files

📝 src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp (+9 -10)
📝 src/cascadia/TerminalApp/CascadiaSettings.cpp (+12 -3)
📝 src/cascadia/TerminalApp/Profile.cpp (+1 -1)
📝 src/cascadia/TerminalApp/Profile.h (+1 -1)

📄 Description

Summary of the Pull Request

Fixed the noexcept specifier on GetGuid, and corrected FindProfile and FindGuid so they don't throw. Also, adjusted SettingsTests to reflect these changes.

References

PR Checklist

  • Closes Start Menu tile color should be customized (#3763)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed updated a test group in SettingsTests
  • 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: #3763

Detailed Description of the Pull Request / Additional comments

The noexcept specifier on GetGuid was not removed when Profile was updated to std::optional<GUID>. This PR fixes that and modifies two helper functions FindProfile and FindGuid in CascadiaSettings to work correctly if GetGuid does throw.

Validation Steps Performed

Updated the TestHelperFunctions test group in SettingsTests and made sure the 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/3806 **Author:** [@mkitzan](https://github.com/mkitzan) **Created:** 12/2/2019 **Status:** ✅ Merged **Merged:** 12/3/2019 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `getguid-noexcept-fix` --- ### 📝 Commits (10+) - [`d6c9d76`](https://github.com/microsoft/terminal/commit/d6c9d765bafe3076c48a0b411c8279aebda36b8e) Added FindGuid helper function - [`033861a`](https://github.com/microsoft/terminal/commit/033861a98aad3643ccfcf8ce4917d2eec47317b2) Style change - [`b4c5e4e`](https://github.com/microsoft/terminal/commit/b4c5e4e14fddff374610ce01cb8295d81281fe07) Tests for FindGuid and FindProfile - [`b4d57da`](https://github.com/microsoft/terminal/commit/b4d57da406328383d6e2e3eeb8995cf5816801cb) Fixed code format? - [`10d9578`](https://github.com/microsoft/terminal/commit/10d9578117f46ef820357672888564716c1f3bc4) Code format guess - [`08de164`](https://github.com/microsoft/terminal/commit/08de1643dc020c5f1983c8dc0146755c8ba0f543) optional<GUID> fix - [`48ff6cd`](https://github.com/microsoft/terminal/commit/48ff6cd3d5e47a4395e73ac9156119a84116d074) Updated function desc - [`d7cb7f4`](https://github.com/microsoft/terminal/commit/d7cb7f4126e3340dd67b37d59212b21e573edc16) Fixed throwing cast - [`afc8ed3`](https://github.com/microsoft/terminal/commit/afc8ed30f17b85afd90485bb4d4de043aedc0853) Merge branch 'find-guid-helper' - [`f7349d7`](https://github.com/microsoft/terminal/commit/f7349d79f51d94a0cccb26dcd4c9ea4a3aacdd31) Merge branch 'floating-point-comp' ### 📊 Changes **4 files changed** (+23 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp` (+9 -10) 📝 `src/cascadia/TerminalApp/CascadiaSettings.cpp` (+12 -3) 📝 `src/cascadia/TerminalApp/Profile.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/Profile.h` (+1 -1) </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 Fixed the noexcept specifier on `GetGuid`, and corrected `FindProfile` and `FindGuid` so they don't throw. Also, adjusted `SettingsTests` to reflect these changes. <!-- 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] Closes #3763 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed updated a test group in `SettingsTests` * [ ] Requires documentation to be updated * [x] 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: #3763 <!-- 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 The `noexcept` specifier on `GetGuid` was not removed when `Profile` was [updated](https://github.com/microsoft/terminal/issues/3763#issuecomment-559497094) to `std::optional<GUID>`. This PR fixes that and modifies two helper functions `FindProfile` and `FindGuid` in `CascadiaSettings` to work correctly if `GetGuid` does throw. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Updated the `TestHelperFunctions` test group in `SettingsTests` and made sure the 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:09:58 +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#25510