Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/core/StarImageProcessing.cpp2
-rw-r--r--source/core/StarLexicalCast.hpp2
-rw-r--r--source/core/StarMap.hpp4
-rw-r--r--source/core/StarOrderedMap.hpp2
-rw-r--r--source/core/StarSectorArray2D.hpp2
-rw-r--r--source/game/StarInput.cpp8
-rw-r--r--source/game/scripting/StarInputLuaBindings.cpp2
7 files changed, 11 insertions, 11 deletions
diff --git a/source/core/StarImageProcessing.cpp b/source/core/StarImageProcessing.cpp
index 27519bb..a98e7e5 100644
--- a/source/core/StarImageProcessing.cpp
+++ b/source/core/StarImageProcessing.cpp
@@ -201,7 +201,7 @@ ImageOperation imageOperationFromString(StringView string) {
else if (!which || (ptr != end && ++ptr != end))
throw ImageOperationException(strf("Improper size for hex string '{}' in imageOperationFromString", StringView(hexPtr, hexLen)), false);
else // we're in A of A=B. In vanilla only A=B pairs are evaluated, so only throw an exception if B is also there.
- return std::move(operation);
+ return operation;
which = !which;
diff --git a/source/core/StarLexicalCast.hpp b/source/core/StarLexicalCast.hpp
index 9e5a4a2..7c43137 100644
--- a/source/core/StarLexicalCast.hpp
+++ b/source/core/StarLexicalCast.hpp
@@ -30,7 +30,7 @@ Maybe<Type> maybeLexicalCast(StringView s, std::ios_base::fmtflags flags = std::
if (stream >> ch)
return {};
- return std::move(result);
+ return result;
}
template <typename Type>
diff --git a/source/core/StarMap.hpp b/source/core/StarMap.hpp
index e3f9d67..187f4cf 100644
--- a/source/core/StarMap.hpp
+++ b/source/core/StarMap.hpp
@@ -172,7 +172,7 @@ auto MapMixin<BaseMap>::maybeTake(key_type const& k) -> Maybe<mapped_type> {
if (i != Base::end()) {
mapped_type v = std::move(i->second);
Base::erase(i);
- return std::move(v);
+ return v;
}
return {};
@@ -198,7 +198,7 @@ template <typename BaseMap>
auto MapMixin<BaseMap>::value(key_type const& k, mapped_type d) const -> mapped_type {
const_iterator i = Base::find(k);
if (i == Base::end())
- return std::move(d);
+ return d;
else
return i->second;
}
diff --git a/source/core/StarOrderedMap.hpp b/source/core/StarOrderedMap.hpp
index 8c787e0..be99769 100644
--- a/source/core/StarOrderedMap.hpp
+++ b/source/core/StarOrderedMap.hpp
@@ -242,7 +242,7 @@ template <template <typename...> class Map, typename Key, typename Value, typena
auto OrderedMapWrapper<Map, Key, Value, Allocator, MapArgs...>::value(key_type const& k, mapped_type d) const -> mapped_type {
auto i = m_map.find(k);
if (i == m_map.end())
- return std::move(d);
+ return d;
else
return i->second->second;
}
diff --git a/source/core/StarSectorArray2D.hpp b/source/core/StarSectorArray2D.hpp
index 870881f..1dd88a1 100644
--- a/source/core/StarSectorArray2D.hpp
+++ b/source/core/StarSectorArray2D.hpp
@@ -235,7 +235,7 @@ typename SectorArray2D<ElementT, SectorSize>::ArrayPtr SectorArray2D<ElementT, S
ArrayPtr ret;
m_loadedSectors.remove(id);
std::swap(m_sectors(id[0], id[1]), ret);
- return std::move(ret);
+ return ret;
}
template <typename ElementT, size_t SectorSize>
diff --git a/source/game/StarInput.cpp b/source/game/StarInput.cpp
index 8dcf8e9..3a2fa9f 100644
--- a/source/game/StarInput.cpp
+++ b/source/game/StarInput.cpp
@@ -172,7 +172,7 @@ Json Input::bindToJson(Bind const& bind) {
}; // don't want empty mods to exist as null entry
if (auto mods = keyModsToJson(keyBind->mods))
obj.emplace("mods", std::move(mods));
- return std::move(obj);
+ return obj;
}
else if (auto mouseBind = bind.ptr<MouseBind>()) {
auto obj = JsonObject{
@@ -181,7 +181,7 @@ Json Input::bindToJson(Bind const& bind) {
};
if (auto mods = keyModsToJson(mouseBind->mods))
obj.emplace("mods", std::move(mods));
- return std::move(obj);
+ return obj;
}
else if (auto controllerBind = bind.ptr<ControllerBind>()) {
return JsonObject{
@@ -577,7 +577,7 @@ Json Input::getDefaultBinds(String const& categoryId, String const& bindId) {
for (Bind const& bind : bindEntry(categoryId, bindId).defaultBinds)
array.emplace_back(bindToJson(bind));
- return std::move(array);
+ return array;
}
Json Input::getBinds(String const& categoryId, String const& bindId) {
@@ -585,7 +585,7 @@ Json Input::getBinds(String const& categoryId, String const& bindId) {
for (Bind const& bind : bindEntry(categoryId, bindId).customBinds)
array.emplace_back(bindToJson(bind));
- return std::move(array);
+ return array;
}
void Input::setBinds(String const& categoryId, String const& bindId, Json const& jBinds) {
diff --git a/source/game/scripting/StarInputLuaBindings.cpp b/source/game/scripting/StarInputLuaBindings.cpp
index 9d710d4..9a99c4a 100644
--- a/source/game/scripting/StarInputLuaBindings.cpp
+++ b/source/game/scripting/StarInputLuaBindings.cpp
@@ -49,7 +49,7 @@ LuaCallbacks LuaBindings::makeInputCallbacks() {
result.emplace_back(jEvent.set("processed", pair.second));
}
- return std::move(result);
+ return result;
});
callbacks.registerCallbackWithSignature<Vec2I>("mousePosition", bind(mem_fn(&Input::mousePosition), input));