Core/StringExt: Don't pass string_view by ref
https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Nz
|
||||
inline SimpleTextDrawer(SimpleTextDrawer&& drawer) noexcept;
|
||||
~SimpleTextDrawer() = default;
|
||||
|
||||
inline void AppendText(const std::string_view& str);
|
||||
inline void AppendText(std::string_view str);
|
||||
|
||||
void Clear() override;
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Nz
|
||||
inline void DisconnectFontSlots();
|
||||
|
||||
bool GenerateGlyph(Glyph& glyph, char32_t character, float outlineThickness, bool lineWrap, Color color, int renderOrder, int* advance) const;
|
||||
void GenerateGlyphs(const std::string_view& text) const;
|
||||
void GenerateGlyphs(std::string_view text) const;
|
||||
|
||||
inline float GetLineHeight(const Font::SizeInfo& sizeInfo) const;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Nz
|
||||
operator=(std::move(drawer));
|
||||
}
|
||||
|
||||
inline void SimpleTextDrawer::AppendText(const std::string_view& str)
|
||||
inline void SimpleTextDrawer::AppendText(std::string_view str)
|
||||
{
|
||||
m_text.append(str);
|
||||
if (m_glyphUpdated)
|
||||
|
||||
Reference in New Issue
Block a user