Add a few asserts. NFC.

This commit is contained in:
Ryan Pavlik 2018-01-03 20:18:38 -06:00 committed by whitequark
parent e243396c6f
commit 31f58738f2
2 changed files with 3 additions and 2 deletions

View File

@ -289,8 +289,8 @@ void SMesh::MakeFromDifferenceOf(SMesh *a, SMesh *b) {
}
void SMesh::MakeFromCopyOf(SMesh *a) {
int i;
for(i = 0; i < a->l.n; i++) {
ssassert(this != a, "Can't make from copy of self");
for(int i = 0; i < a->l.n; i++) {
AddTriangle(&(a->l.elem[i]));
}
}

View File

@ -829,6 +829,7 @@ void SShell::MakeFromRevolutionOf(SBezierLoopSet *sbls, Vector pt, Vector axis,
}
void SShell::MakeFromCopyOf(SShell *a) {
ssassert(this != a, "Can't make from copy of self");
MakeFromTransformationOf(a,
Vector::From(0, 0, 0), Quaternion::IDENTITY, 1.0);
}