MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / copy

Method copy

source/core/StarMultiArray.hpp:352–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350
351template <typename Element, size_t Rank>
352void MultiArray<Element, Rank>::copy(MultiArray const& source) {
353 IndexArray max;
354 for (size_t i = 0; i < Rank; ++i)
355 max[i] = std::min(size(i), source.size(i));
356
357 copy(source, IndexArray::filled(0), max, IndexArray::filled(0));
358}
359
360template <typename Element, size_t Rank>
361void MultiArray<Element, Rank>::copy(MultiArray const& source, IndexArray const& sourceMin, IndexArray const& sourceMax, IndexArray const& targetMin) {

Callers 1

resizeMethod · 0.45

Calls 3

sizeFunction · 0.85
copyFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected