MCPcopy Create free account
hub / github.com/Illation/ETEngine / insert_impl

Method insert_impl

Engine/source/EtCore/Containers/slot_map.h:162–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 //---------
161private:
162 std::pair<iterator, id_type> insert_impl(TType&& value)
163 {
164 index_type const dataPos = static_cast<index_type>(m_Data.size());
165
166 index_type indexPos;
167 if (m_FreeHead == s_InvalidIndex)
168 {
169 indexPos = static_cast<index_type>(m_Indices.size());
170 m_Indices.push_back(dataPos);
171 }
172 else
173 {
174 indexPos = m_FreeHead;
175 m_FreeHead = m_Indices[m_FreeHead];
176 m_Indices[indexPos] = dataPos;
177 }
178
179 m_Data.push_back(std::forward<TType>(value));
180 m_IndexPositions.push_back(indexPos);
181
182 return std::make_pair(get_iterator(indexPos), indexPos);
183 }
184
185 // Data
186 ///////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected