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

summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 18:39:01 +0100
committerKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 18:39:01 +0100
commit7c4fbad2ba7d79580a9ebbf9fde1de117be4d08e (patch)
treef7c8e96e744222857c613e5fd14720d2695613c3 /source/core
parent431a9c00a56cf4c603be1cf5f773b193621d8150 (diff)
Removed some redundant std::move usages in return statements.
Diffstat (limited to 'source/core')
-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
5 files changed, 6 insertions, 6 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>