MCPcopy Create free account
hub / github.com/FastLED/FastLED / to_array

Function to_array

src/fl/stl/array.h:217–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215// Copies exactly N elements from span (span must have at least N elements)
216template <fl::size N, typename T>
217array<T, N> to_array(fl::span<const T, fl::size(-1)> s) FL_NOEXCEPT {
218 array<T, N> result;
219 for (fl::size i = 0; i < N; ++i) {
220 result.mData[i] = s[i];
221 }
222 return result;
223}
224
225// Helper function to create array from span (static extent)
226template <typename T, fl::size N>

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 1

sizeFunction · 0.70

Tested by

no test coverage detected