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

Method Clone

lib/base/array.cpp:254–264  ·  view source on GitHub ↗

* Makes a deep clone of an array * and its elements. * * @returns a copy of the array. */

Source from the content-addressed store, hash-verified

252 * @returns a copy of the array.
253 */
254Object::Ptr Array::Clone() const
255{
256 ArrayData arr;
257
258 ObjectLock olock(this);
259 for (const Value& val : m_Data) {
260 arr.push_back(val.Clone());
261 }
262
263 return new Array(std::move(arr));
264}
265
266Array::Ptr Array::Reverse() const
267{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected