Skip to content

Commit 8f963ff

Browse files
committed
invalid_argument -> assert
1 parent 2339283 commit 8f963ff

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Contact.cxx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,8 @@ vtkSmartPointer<vtkPolyData> Clean (vtkPolyData *pd) {
122122
}
123123

124124
Contact::Contact (vtkPolyData *newPdA, vtkPolyData *newPdB) : newPdA(newPdA), newPdB(newPdB) {
125-
if (newPdA->GetCellData()->GetScalars("OrigCellIds") == nullptr) {
126-
throw std::invalid_argument("OrigCellIds is missing.");
127-
}
128-
129-
if (newPdB->GetCellData()->GetScalars("OrigCellIds") == nullptr) {
130-
throw std::invalid_argument("OrigCellIds is missing.");
131-
}
125+
assert(newPdA->GetCellData()->GetScalars("OrigCellIds") != nullptr);
126+
assert(newPdB->GetCellData()->GetScalars("OrigCellIds") != nullptr);
132127

133128
pts = vtkSmartPointer<vtkPoints>::New();
134129
pts->SetDataTypeToDouble();

Utilities.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ void FindPoints (vtkKdTreePointLocator *pl, const double *pt, vtkIdList *pts, do
5656

5757
vtkIdList *closest = vtkIdList::New();
5858

59-
// vtkKdTree.cxx#L2505
60-
// arbeitet mit single-precision
6159
pl->FindPointsWithinRadius(std::max(1e-3, tol), pt, closest);
6260

6361
vtkIdType i, numPts = closest->GetNumberOfIds();

doc/interPts.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)