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/resources/db/itemdb.cpp | 3 ++- src/resources/db/unitsdb.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/resources/db') diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 440b69d16..57000cf95 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -45,6 +45,7 @@ #include "utils/delete2.h" #include "utils/dtor.h" #include "utils/foreach.h" +#include "utils/stdmove.h" #include "utils/stringmap.h" #include "utils/translation/podict.h" @@ -355,7 +356,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, SpriteDisplay display; display.image = image; if (!floor.empty()) - display.floor = floor; + display.floor = STD_MOVE(floor); else display.floor = image; diff --git a/src/resources/db/unitsdb.cpp b/src/resources/db/unitsdb.cpp index 9481406c4..e9b310c6d 100644 --- a/src/resources/db/unitsdb.cpp +++ b/src/resources/db/unitsdb.cpp @@ -27,6 +27,7 @@ #include "const/resources/currency.h" #include "utils/checkutils.h" +#include "utils/stdmove.h" #include "resources/beingcommon.h" @@ -372,7 +373,7 @@ static std::string splitNumber(std::string str, if (!result.empty()) result = std::string(str).append(separator).append(result); else - result = str; + result = STD_MOVE(str); } } -- cgit v1.2.3-70-g09d2