MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / flatten

Function flatten

src/python/PyImath/imathmodule.cpp:118–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117template <typename T>
118const T*
119flatten(const PyImath::FixedArray<T>& q, std::unique_ptr<T[]>& handle)
120{
121 if (q.isMaskedReference())
122 {
123 const size_t len = q.len();
124 handle.reset(new T[len]);
125 for (size_t i = 0; i < len; ++i)
126 handle[i] = q[i];
127
128 return handle.get();
129 }
130
131 return &q[0];
132}
133
134template <typename T>
135IMATH_NAMESPACE::M44d

Callers 1

Calls 3

getMethod · 0.80
isMaskedReferenceMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected