Widgets/TextAreaWidget: [SetText] Pass std::string by value
This commit is contained in:
parent
e5318e49fe
commit
1bbfd9fdd2
|
|
@ -41,7 +41,7 @@ namespace Nz
|
||||||
inline void SetCharacterSize(unsigned int characterSize);
|
inline void SetCharacterSize(unsigned int characterSize);
|
||||||
inline void SetCharacterSpacingOffset(float offset);
|
inline void SetCharacterSpacingOffset(float offset);
|
||||||
inline void SetLineSpacingOffset(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 SetTextColor(const Color& text);
|
||||||
inline void SetTextFont(std::shared_ptr<Font> font);
|
inline void SetTextFont(std::shared_ptr<Font> font);
|
||||||
inline void SetTextOutlineColor(const Color& color);
|
inline void SetTextOutlineColor(const Color& color);
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,9 @@ namespace Nz
|
||||||
UpdateDisplayText();
|
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);
|
OnTextChanged(this, m_text);
|
||||||
|
|
||||||
UpdateDisplayText();
|
UpdateDisplayText();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue