MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / each_new

Method each_new

StereoKitC/libraries/array.h:159–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 U each_sum (U (*e)(const T &)) const { U result = 0; for (int32_t i = 0; i < count; i++) result += e(data[i]); return result; }
158 template <typename U>
159 array_t<U> each_new (U (*e)(const T &)) const { array_t<U> result = {}; result.resize(count); for (int32_t i=0; i<count; i++) result.add(e(data[i])); return result; }
160 void free ();
161
162 static array_t<T> make (int32_t capacity) { array_t<T> result = {}; result.resize(capacity); return result; }

Callers

nothing calls this directly

Calls 2

addMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected