diff --git a/Filtering/vtkCellTreeLocator.cxx b/Filtering/vtkCellTreeLocator.cxx index 8915fc06b7ae6ac04c3b86f74f93f9cc82004551..38e18cf2423b1d685e564021c29e1b64ad6eb4ce 100644 --- a/Filtering/vtkCellTreeLocator.cxx +++ b/Filtering/vtkCellTreeLocator.cxx @@ -651,7 +651,8 @@ vtkIdType vtkCellTreeLocator::FindCell( double pos[3], double , vtkGenericCell * double closestPoint[3], dist2; int subId; - const float _pos[3] = { pos[0], pos[1], pos[2] }; + const float _pos[3] = { static_cast<float>(pos[0]), static_cast<float>(pos[1]), + static_cast<float>(pos[2]) }; vtkCellPointTraversal pt( *(this->Tree), _pos ); //bool found = false; diff --git a/Filtering/vtkKdTree.cxx b/Filtering/vtkKdTree.cxx index f853085cdb8782e708cbf59e82e3dc2dd5d855c9..509c1f34ab71791535e5549a78c00ff76db3af5c 100644 --- a/Filtering/vtkKdTree.cxx +++ b/Filtering/vtkKdTree.cxx @@ -2667,7 +2667,8 @@ void vtkKdTree::FindClosestNPoints(int N, const double x[3], } int *ids = this->LocatorIds + where; float* pt = this->LocatorPoints + (where*3); - float xfloat[3] = {x[0], x[1], x[2]}; + float xfloat[3] = {static_cast<float>(x[0]), static_cast<float>(x[1]), + static_cast<float>(x[2])}; OrderPoints orderedPoints(N); for (int i=0; i<numPoints; i++) {