[PR #11640] Add noexcept to all FontInfo structs #28683

Closed
opened 2026-01-31 09:30:06 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


FontInfoBase and it's descendents are missing noexcept annotations, which
virally forces other code to not be noexcept as well during AuditMode checks.
Apart from adding noexcept, this commit also

  • Passes std::wstring_view by reference.
  • Pass the FillLegacyNameBuffer argument as a simple pointer-to-array,
    allowing us to fill the buffer with a single memcpy.
    (gsl::span's iterators inhibit any internal STL optimizations.)
  • Move operator== declarations inside the class to reduce code size.

All other changes are an effect of the virality of noexcept.

This is an offshoot from #11623.

Validation Steps Performed

  • It still compiles ✔️
**Original Pull Request:** https://github.com/microsoft/terminal/pull/11640 **State:** closed **Merged:** Yes --- FontInfoBase and it's descendents are missing noexcept annotations, which virally forces other code to not be noexcept as well during AuditMode checks. Apart from adding noexcept, this commit also * Passes std::wstring_view by reference. * Pass the FillLegacyNameBuffer argument as a simple pointer-to-array, allowing us to fill the buffer with a single memcpy. (gsl::span's iterators inhibit any internal STL optimizations.) * Move operator== declarations inside the class to reduce code size. All other changes are an effect of the virality of noexcept. This is an offshoot from #11623. ## Validation Steps Performed * It still compiles ✔️
claunia added the pull-request label 2026-01-31 09:30:06 +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#28683