Skip to content
Snippets Groups Projects
Commit 111750a5 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

WRG: remove unsigned int comparison with <0

parent c16d6e4a
No related branches found
No related tags found
No related merge requests found
/*=========================================================================
Program: ORFEO Toolbox
......@@ -337,7 +338,7 @@ LabelObjectToPolygonFunctor<TLabelObject, TPolygon>
IndexType resp;
resp[0] = -1;
if (line < 0 || line >= m_InternalDataSet.size())
if (line >= m_InternalDataSet.size())
{
resp[1] = -1;
return resp;
......@@ -403,7 +404,7 @@ LabelObjectToPolygonFunctor<TLabelObject, TPolygon>
IndexType resp;
resp[0] = -1;
if (line < 0 || line >= m_InternalDataSet.size())
if (line >= m_InternalDataSet.size())
{
resp[1] = -1;
return resp;
......@@ -439,7 +440,7 @@ LabelObjectToPolygonFunctor<TLabelObject, TPolygon>
IndexType resp;
resp[0] = -1;
if (line < 0 || line >= m_InternalDataSet.size())
if (line >= m_InternalDataSet.size())
{
resp[1] = -1;
return resp;
......
......@@ -119,10 +119,8 @@ SpectralResponse<TPrecision, TValuePrecision>
//this test should be always true since
// lambda<=lambdaMin and lambda>=lambdaMax have been just tested
if ((lambdaPosGuess < 0) || (lambdaPosGuess > m_Response.size()))
{
return 0;
}
assert(!(lambdaPosGuess < 0) || (lambdaPosGuess > m_Response.size()));
// TODO JGU : test algorithm
//lambdaPosGuess calculus have been modified (initially lambdaPosGuess = static_cast<unsigned int> ((lambda - lambdaMin) / (lambdaMax - lambdaMin)
//* m_Response.size() -1). lambdaPosGuess = 0 for lambda contained in m_Response first bin
......
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