Skip to content

Fix warnings on Windows for the Local Rx Filter

Cédric Traizet requested to merge fix_warning_local_Rx into develop

Summary

This MR fixes the warnings introduced by the local Rx filter.

Rationale

We have the following loop :


for (int y = -externalRadius[1]; y <= static_cast<int>(externalRadius[1]); y++)
      {
      off[1] = y;
      for (int x = -externalRadius[0]; x <= static_cast<int>(externalRadius[0]); x++)
        {
        off[0] = x;
        if ((abs(x) > internalRadiusX) || (abs(y) > internalRadiusY))
          {
            listSample->PushBack(in.GetPixel(off));
          }
        }
      }

where externalRadius[1] is of type unsigned int.

On Linux it's ok, but on Windows we have warnings because exteralRadius is not casted to int. Note that the tests are not failing because we are lucky with the overflow.

This MR add the required static casts

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement

Merge request reports

Loading