Widgets/TextAreaWidget: [SetText] Pass std::string by value

This commit is contained in:
SirLynix 2023-08-09 19:37:51 +02:00
parent e5318e49fe
commit 1bbfd9fdd2
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ namespace Nz
inline void SetCharacterSize(unsigned int characterSize);
inline void SetCharacterSpacingOffset(float offset);
inline void SetLineSpacingOffset(float offset);
inline void SetText(const std::string& text);
inline void SetText(std::string text);
inline void SetTextColor(const Color& text);
inline void SetTextFont(std::shared_ptr<Font> font);
inline void SetTextOutlineColor(const Color& color);

View File

@ -79,9 +79,9 @@ namespace Nz
UpdateDisplayText();
}
inline void TextAreaWidget::SetText(const std::string& text)
inline void TextAreaWidget::SetText(std::string text)
{
m_text = text;
m_text = std::move(text);
OnTextChanged(this, m_text);
UpdateDisplayText();