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

summaryrefslogtreecommitdiff
path: root/source/core/StarMap.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-02-20 09:49:42 +1100
committerGitHub <noreply@github.com>2024-02-20 09:49:42 +1100
commitaa987a217779e71f97ee4c9cce531aec1c861bf8 (patch)
treee51fcce110306d93bf93870f13a5ff7d6b575427 /source/core/StarMap.hpp
parentd0099a6d790b66f21e4e266e569d64fb82fb0a81 (diff)
parent1c89042016c739815b2d70bcbef4673eef6b63e0 (diff)
Merge branch 'main' into small-fixes
Diffstat (limited to 'source/core/StarMap.hpp')
-rw-r--r--source/core/StarMap.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/core/StarMap.hpp b/source/core/StarMap.hpp
index cf9c260..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 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;
}
@@ -260,12 +260,12 @@ auto MapMixin<BaseMap>::hasValue(mapped_type const& v) const -> bool {
template <typename BaseMap>
auto MapMixin<BaseMap>::insert(key_type k, mapped_type v) -> pair<iterator, bool> {
- return Base::insert(value_type(move(k), move(v)));
+ return Base::insert(value_type(std::move(k), std::move(v)));
}
template <typename BaseMap>
auto MapMixin<BaseMap>::add(key_type k, mapped_type v) -> mapped_type& {
- auto pair = Base::insert(value_type(move(k), move(v)));
+ auto pair = Base::insert(value_type(std::move(k), std::move(v)));
if (!pair.second)
throw MapException(strf("Entry with key '{}' already present.", outputAny(k)));
else
@@ -276,10 +276,10 @@ template <typename BaseMap>
auto MapMixin<BaseMap>::set(key_type k, mapped_type v) -> mapped_type& {
auto i = Base::find(k);
if (i != Base::end()) {
- i->second = move(v);
+ i->second = std::move(v);
return i->second;
} else {
- return Base::insert(value_type(move(k), move(v))).first->second;
+ return Base::insert(value_type(std::move(k), std::move(v))).first->second;
}
}