MCPcopy Create free account
hub / github.com/Icinga/icinga2 / Insert

Method Insert

lib/base/array.cpp:150–160  ·  view source on GitHub ↗

* Insert the given value at the specified index * * @param index The index * @param value The value to add */

Source from the content-addressed store, hash-verified

148 * @param value The value to add
149 */
150void Array::Insert(SizeType index, Value value)
151{
152 ObjectLock olock(this);
153
154 ASSERT(index <= m_Data.size());
155
156 if (m_Frozen)
157 BOOST_THROW_EXCEPTION(std::invalid_argument("Array must not be modified."));
158
159 m_Data.insert(m_Data.begin() + index, std::move(value));
160}
161
162/**
163 * Removes the specified index from the array.

Callers 2

CalcEventIDMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 3

sizeMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected