From 8d1e23c6fb900396e9f80dd24ff3e7f72fe75e64 Mon Sep 17 00:00:00 2001 From: Thomas Feuvrier <thomas.feuvrier@c-s.fr> Date: Mon, 21 Sep 2009 19:17:20 +0200 Subject: [PATCH] WRG: Remove warning. --- Code/BasicFilters/otbCorrectPolygonFunctor.h | 2 +- Code/Common/otbGISTable.h | 2 +- Code/Common/otbVectorDataProperties.h | 2 +- Code/Common/otbVectorDataToLabelMapFilter.txx | 23 +++++++++---------- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Code/BasicFilters/otbCorrectPolygonFunctor.h b/Code/BasicFilters/otbCorrectPolygonFunctor.h index 4c2e1c65ce..137b9ba321 100644 --- a/Code/BasicFilters/otbCorrectPolygonFunctor.h +++ b/Code/BasicFilters/otbCorrectPolygonFunctor.h @@ -66,4 +66,4 @@ public: } -#endif \ No newline at end of file +#endif diff --git a/Code/Common/otbGISTable.h b/Code/Common/otbGISTable.h index 3595376922..62d9c96f2e 100644 --- a/Code/Common/otbGISTable.h +++ b/Code/Common/otbGISTable.h @@ -111,7 +111,7 @@ public: virtual std::string GetOGRStrConnection() const {return 0;}; /** Add an alpha numeric column to the table */ - virtual const std::string AddVarCharColumn(unsigned int size) {}; + virtual const std::string AddVarCharColumn(unsigned int size) {return 0;}; /** Insert Alpha Numeric Data in the Car char column */ virtual void AddStrDataToVarCharColumn(std::string data) {}; diff --git a/Code/Common/otbVectorDataProperties.h b/Code/Common/otbVectorDataProperties.h index 8501442674..6f04f61911 100644 --- a/Code/Common/otbVectorDataProperties.h +++ b/Code/Common/otbVectorDataProperties.h @@ -105,4 +105,4 @@ class ITK_EXPORT VectorDataProperties : public itk::DataObject #include "otbVectorDataProperties.txx" #endif -#endif \ No newline at end of file +#endif diff --git a/Code/Common/otbVectorDataToLabelMapFilter.txx b/Code/Common/otbVectorDataToLabelMapFilter.txx index ec37eb11b6..5754014cc2 100644 --- a/Code/Common/otbVectorDataToLabelMapFilter.txx +++ b/Code/Common/otbVectorDataToLabelMapFilter.txx @@ -111,7 +111,6 @@ VectorDataToLabelMapFilter<TVectorData, TLabelMap > // we can't call the superclass method here. // get pointers to the input and output - const InputVectorDataType * input = this->GetInput(); OutputLabelMapType * outputPtr = this->GetOutput(); if ( !outputPtr ) @@ -219,8 +218,6 @@ void OutputLabelMapType * output = this->GetOutput(); - const InputVectorDataType * input = this->GetInput(); - //For each input for (unsigned int idx = 0; idx < this->GetNumberOfInputs(); ++idx) { @@ -301,9 +298,11 @@ VectorDataToLabelMapFilter< TVectorData, TLabelMap > PolygonPointerType correctPolygonExtRing = correct( dataNode->GetPolygonExteriorRing() ); - typedef typename DataNodeType::PolygonType PolygonType; - typedef typename PolygonType::RegionType RegionType; - typedef typename PolygonType::VertexType VertexType; + typedef typename DataNodeType::PolygonType PolygonType; + typedef typename PolygonType::RegionType RegionType; + typedef typename PolygonType::VertexType VertexType; + typedef typename IndexType::IndexValueType IndexValueType; + typedef typename VertexType::ValueType VertexValueType; RegionType polygonExtRingBoundReg = correctPolygonExtRing->GetBoundingRegion(); @@ -313,18 +312,18 @@ VectorDataToLabelMapFilter< TVectorData, TLabelMap > std::cout << "spacing " << this->GetOutput()->GetSpacing()<< std::endl; // For each position in the bounding region of the polygon - for (int i = polygonExtRingBoundReg.GetOrigin(0);i < polygonExtRingBoundReg.GetOrigin(0) + polygonExtRingBoundReg.GetSize(0) ;i+=this->GetOutput()->GetSpacing()[0]) + for (unsigned int i = polygonExtRingBoundReg.GetOrigin(0);i < polygonExtRingBoundReg.GetOrigin(0) + polygonExtRingBoundReg.GetSize(0) ;i+=this->GetOutput()->GetSpacing()[0]) { - vertex[0] = i ; - for (int j = polygonExtRingBoundReg.GetOrigin(1);j<polygonExtRingBoundReg.GetOrigin(1) + polygonExtRingBoundReg.GetSize(1) ;j+=this->GetOutput()->GetSpacing()[1]) + vertex[0] = static_cast<VertexValueType>(i) ; + for (unsigned int j = polygonExtRingBoundReg.GetOrigin(1);j<polygonExtRingBoundReg.GetOrigin(1) + polygonExtRingBoundReg.GetSize(1) ;j+=this->GetOutput()->GetSpacing()[1]) { - vertex[1] = j ; + vertex[1] = static_cast<VertexValueType>(j) ; if (correctPolygonExtRing->IsInside(vertex) || correctPolygonExtRing->IsOnEdge (vertex)) { IndexType index; - index[0] = vertex[0] - polygonExtRingBoundReg.GetOrigin(0); - index[1] = vertex[1] - polygonExtRingBoundReg.GetOrigin(1); + index[0] = static_cast<IndexValueType>(vertex[0] - polygonExtRingBoundReg.GetOrigin(0)); + index[1] = static_cast<IndexValueType>(vertex[1] - polygonExtRingBoundReg.GetOrigin(1)); // index[0] += this->GetOutput()->GetOrigin()[0]; // index[1] += this->GetOutput()->GetOrigin()[1]; // std::cout << "index " << index << std::endl; -- GitLab