MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / operator=

Method operator=

source/core/StarFlatHashTable.hpp:144–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142
143template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator>
144auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::operator=(Bucket const& rhs) -> Bucket& {
145 if (auto o = rhs.valuePtr()) {
146 if (auto s = valuePtr())
147 *s = *o;
148 else
149 new (&this->value) Value(*o);
150 } else {
151 if (auto s = valuePtr())
152 s->~Value();
153 }
154 this->hash = rhs.hash;
155 return *this;
156}
157
158template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator>
159auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::operator=(Bucket&& rhs) -> Bucket& {

Callers

nothing calls this directly

Calls 1

valuePtrMethod · 0.80

Tested by

no test coverage detected