[Audit] Use std::wstring_view for all global strings
#2 674 ouverte le 5 sept. 2019
Métriques du dépôt
- Stars
- (35 764 stars)
- Métriques de merge PR
- (Merge moyen 27j 19h) (24 PRs mergées en 30 j)
Description
I left this behind in the audit mode enable phase.
This is because changing the DEFAULT_FONT_FACE to a std::wstring_view cascades in a way that is troublesome.
For one, std::wstring_view is not guaranteed to be null terminated. Some of the consumers of this value throughout the codebase use the pointer to this memory location as a z-terminated string instead of a counted string. In the context of pointing to a globally allocated string, we can probably feel safe that it is null terminated and could ignore this. But I don't like ignoring things like this as they pop up later when refactoring occurs.
For two, changing the way the font face string works cascades through the entire FontInfo and friends classes in a way that touches many, many things. I don't really want to move all of that around without also addressing #602 at the same time because we've already identified that this particular value needs to change in those classes to satisfy that bug and circumstance.'
For three, we haven't even started talking about the cascading effects of doing this to the other three strings.
So for now, I've punted and left this TODO behind.