From 750b30a7c12f10bdf5500565149678207ccd000b Mon Sep 17 00:00:00 2001 From: Andrew Bauer <andy.bauer@kitware.com> Date: Tue, 3 Apr 2012 22:46:33 -0400 Subject: [PATCH] Changes to get rid of C++11 compiler warnings. Change-Id: Ifbac8c25db7924f485284ee47443009670e0d174 --- Filtering/vtkCellTreeLocator.cxx | 3 ++- Filtering/vtkKdTree.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Filtering/vtkCellTreeLocator.cxx b/Filtering/vtkCellTreeLocator.cxx index 8915fc06b7a..38e18cf2423 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 f853085cdb8..509c1f34ab7 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++) { -- GitLab