diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-02-20 09:49:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 09:49:42 +1100 |
commit | aa987a217779e71f97ee4c9cce531aec1c861bf8 (patch) | |
tree | e51fcce110306d93bf93870f13a5ff7d6b575427 /source/core/StarFlatHashTable.hpp | |
parent | d0099a6d790b66f21e4e266e569d64fb82fb0a81 (diff) | |
parent | 1c89042016c739815b2d70bcbef4673eef6b63e0 (diff) |
Merge branch 'main' into small-fixes
Diffstat (limited to 'source/core/StarFlatHashTable.hpp')
-rw-r--r-- | source/core/StarFlatHashTable.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/core/StarFlatHashTable.hpp b/source/core/StarFlatHashTable.hpp index a13e08a..e9a8680 100644 --- a/source/core/StarFlatHashTable.hpp +++ b/source/core/StarFlatHashTable.hpp @@ -138,7 +138,7 @@ template <typename Value, typename Key, typename GetKey, typename Hash, typename FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::Bucket(Bucket&& rhs) { this->hash = rhs.hash; if (auto o = rhs.valuePtr()) - new (&this->value) Value(move(*o)); + new (&this->value) Value(std::move(*o)); } template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator> @@ -160,9 +160,9 @@ template <typename Value, typename Key, typename GetKey, typename Hash, typename auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::operator=(Bucket&& rhs) -> Bucket& { if (auto o = rhs.valuePtr()) { if (auto s = valuePtr()) - *s = move(*o); + *s = std::move(*o); else - new (&this->value) Value(move(*o)); + new (&this->value) Value(std::move(*o)); } else { if (auto s = valuePtr()) s->~Value(); @@ -174,9 +174,9 @@ auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::operato template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator> void FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::setFilled(size_t hash, Value value) { if (auto s = valuePtr()) - *s = move(value); + *s = std::move(value); else - new (&this->value) Value(move(value)); + new (&this->value) Value(std::move(value)); this->hash = hash | FilledHashBit; } @@ -370,7 +370,7 @@ auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::insert(Value va currentBucket = hashBucket(currentBucket + 1); } else { - target.setFilled(hash, move(value)); + target.setFilled(hash, std::move(value)); ++m_filledCount; if (insertedBucket == NPos) insertedBucket = currentBucket; @@ -392,7 +392,7 @@ auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::erase(const_ite if (auto nextPtr = nextBucket->valuePtr()) { if (bucketError(nextBucketIndex, nextBucket->hash) > 0) { currentBucket->hash = nextBucket->hash; - *currentBucket->valuePtr() = move(*nextPtr); + *currentBucket->valuePtr() = std::move(*nextPtr); currentBucketIndex = nextBucketIndex; currentBucket = nextBucket; } else { @@ -548,7 +548,7 @@ void FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::checkCapacity(s for (auto& entry : oldBuckets) { if (auto ptr = entry.valuePtr()) - insert(move(*ptr)); + insert(std::move(*ptr)); } } |