[Audit] Use std::wstring_view for all global strings
#2.674 aberto em 5 de set. de 2019
Métricas do repositório
- Stars
- (35.764 stars)
- Métricas de merge de PR
- (Mesclagem média 27d 19h) (24 fundiu PRs em 30d)
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.