[PR #5652] Add explicit identifier to some constructors #26410

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

Original Pull Request: https://github.com/microsoft/terminal/pull/5652

State: closed
Merged: Yes


Summary of the Pull Request

If a class has a constructor which can be called with a single argument, then this constructor becomes conversion constructor because such a constructor allows conversion of the single argument to the class being constructed. To ensure these constructors are passed the argument of its type, I labeled them explicit.

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

In some header files, there were constructors that took a value that could involve implicit conversions, so I added explicit to ensure that does not happen.

Validation Steps Performed

Unit testing

**Original Pull Request:** https://github.com/microsoft/terminal/pull/5652 **State:** closed **Merged:** Yes --- <!-- 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 If a class has a constructor which can be called with a single argument, then this constructor becomes conversion constructor because such a constructor allows conversion of the single argument to the class being constructed. To ensure these constructors are passed the argument of its type, I labeled them explicit. <!-- 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 In some header files, there were constructors that took a value that could involve implicit conversions, so I added explicit to ensure that does not happen. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Unit testing
claunia added the pull-request label 2026-01-31 09:15:53 +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#26410