diff --git a/include/Nazara/Widgets/TextAreaWidget.hpp b/include/Nazara/Widgets/TextAreaWidget.hpp index 0a9c8443d..902afbf2e 100644 --- a/include/Nazara/Widgets/TextAreaWidget.hpp +++ b/include/Nazara/Widgets/TextAreaWidget.hpp @@ -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); inline void SetTextOutlineColor(const Color& color); diff --git a/include/Nazara/Widgets/TextAreaWidget.inl b/include/Nazara/Widgets/TextAreaWidget.inl index 3c78208d3..250d4075e 100644 --- a/include/Nazara/Widgets/TextAreaWidget.inl +++ b/include/Nazara/Widgets/TextAreaWidget.inl @@ -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();