Skip to content
Snippets Groups Projects
Commit 38758b70 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

WRG: signed unsigned comparisons

parent 289b0329
No related branches found
No related tags found
1 merge request!5Warning fixes
......@@ -699,7 +699,8 @@ namespace otb
for (int k = first; k < last; ++k)
{
// If under the extracted region
if ((l >= 0 && l < m_PatchSizePerDim) && (k >= 0 && k < m_PatchSizePerDim))
if ((l >= 0 && l < static_cast<int>(m_PatchSizePerDim)) &&
(k >= 0 && k < static_cast<int>(m_PatchSizePerDim)))
{
// Check masterIt (for bounderies)
if (!masterIt.IsAtEnd())
......
......@@ -297,13 +297,13 @@ namespace otb
{
firstL = 0;
}
if (lastC > DEMSize[0]-1)
if (lastC > static_cast<int>(DEMSize[0])-1)
{
lastC = DEMSize[0]-1;
lastC = static_cast<int>(DEMSize[0])-1;
}
if (lastL > DEMSize[1]-1)
if (lastL > static_cast<int>(DEMSize[1])-1)
{
lastL = DEMSize[1]-1;
lastL = static_cast<int>(DEMSize[1])-1;
}
// Transform sides to region
......
......@@ -350,9 +350,11 @@ public:
}
return;
}
if ((index_InRegion[0] + m_SizeWindow) > inputPtr->GetLargestPossibleRegion().GetSize()[0] ||
(index_InRegion[1] + m_SizeWindow) > inputPtr->GetLargestPossibleRegion().GetSize()[1])
{
if ((index_InRegion[0] + m_SizeWindow) >
static_cast<ImageInIndexValueType>(inputPtr->GetLargestPossibleRegion().GetSize()[0]) ||
(index_InRegion[1] + m_SizeWindow) >
static_cast<ImageInIndexValueType>(inputPtr->GetLargestPossibleRegion().GetSize()[1]))
{
for (unsigned int i = 0; i < lastInd; i++)
{
TilesResult[i] = 0;
......
......@@ -684,7 +684,7 @@ namespace otb
{
// Check slave Index
if (Le >= 0 &&
Le < this->GetSlaveCartesianMeanPerLineInput()->GetLargestPossibleRegion().GetSize()[1])
Le < static_cast<int>(this->GetSlaveCartesianMeanPerLineInput()->GetLargestPossibleRegion().GetSize()[1]))
{
// Check if Value into Master and Slave Cartesian Mean with IsData Mask
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment