From 337a52a41ea44570da65586403f14248042f0169 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 29 Jun 2017 21:44:11 +0300 Subject: Use std::move in some places. --- src/gui/widgets/setupitem.cpp | 3 ++- src/gui/widgets/staticbrowserbox.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 8d6296d52..e4b40f9be 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -44,6 +44,7 @@ #include "utils/base64.h" #include "utils/gettext.h" +#include "utils/stdmove.h" #include "utils/mathutils.h" #include "debug.h" @@ -324,7 +325,7 @@ void SetupItemTextField::save() std::string normalValue = mValue; mValue = encodeBase64String(mValue); SetupItem::save(); - mValue = normalValue; + mValue = STD_MOVE(normalValue); } else { diff --git a/src/gui/widgets/staticbrowserbox.cpp b/src/gui/widgets/staticbrowserbox.cpp index ef51660c0..7be4b780e 100644 --- a/src/gui/widgets/staticbrowserbox.cpp +++ b/src/gui/widgets/staticbrowserbox.cpp @@ -46,6 +46,7 @@ #include "utils/browserboxtools.h" #include "utils/checkutils.h" #include "utils/foreach.h" +#include "utils/stdmove.h" #include "utils/stringutils.h" #include "utils/translation/podict.h" @@ -256,7 +257,7 @@ void StaticBrowserBox::addRow(const std::string &row, mTextRowLinksCount.push_back(linksCount); } - std::string plain = newRow; + std::string plain = STD_MOVE(newRow); // workaround if used only one string started from bold // width for this string can be calculated wrong // this workaround fix width if string start from bold sign -- cgit v1.2.3-70-g09d2