Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 206
    • Issues 206
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !382

Fix warnings on Windows for the Local Rx Filter

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Cédric Traizet requested to merge fix_warning_local_Rx into develop Feb 12, 2019
  • Overview 2
  • Commits 2
  • Pipelines 2
  • Changes 1

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
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix_warning_local_Rx