Skip to content

Commit 5be57c2

Browse files
fix one copy op
1 parent 83a66bc commit 5be57c2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

include/nbl/asset/material_compiler3/CFrontendIR.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,11 @@ class CFrontendIR final : public CNodePool
262262
}
263263
inline CSpectralVariable(const CSpectralVariable& other)
264264
{
265-
std::uninitialized_copy_n(other.pWonky(),other.getKnotCount(),pWonky());
265+
const auto* const src = other.pWonky();
266+
auto* const dst = pWonky();
267+
std::uninitialized_copy_n(src,1,dst);
268+
const size_t count = other.getKnotCount();
269+
std::uninitialized_copy_n(src->knots.params+1,count-1,dst->knots.params+1);
266270
}
267271

268272
// encapsulation due to padding abuse

0 commit comments

Comments
 (0)