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

Method operator=

source/core/StarStaticVector.hpp:150–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149template <typename Element, size_t MaxSize>
150auto StaticVector<Element, MaxSize>::operator=(StaticVector const& other) -> StaticVector& {
151 if (this == &other)
152 return *this;
153
154 resize(other.size());
155 for (size_t i = 0; i < m_size; ++i)
156 operator[](i) = other[i];
157
158 return *this;
159}
160
161template <typename Element, size_t MaxSize>
162auto StaticVector<Element, MaxSize>::operator=(StaticVector&& other) -> StaticVector& {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected