Skip to content

Change int to size_t where appropriate #26

Description

@alexallmont

During pre publish tidy (#22), a lot of warnings were due to signed to unsigned conversion. This was due to many variables being int where their actual use was unsigned indexing. I started converting these as part of #22 but it became apparent that it would affect a lot of code, and the changes may have caused regressions.

Work to do:

  • Re-enable -Wsign-conversion in CompilerWarnings.cmake, replace ints with size_t and review with Arni to confirm no bad assumptions made (e.g. alleles are tracked with actual int as commonly tagged as -7).
  • Also search for static_cast and remove any unnecessary usage.
  • Ensure the final commit has -Wsign-conversion enabled so this is picked up in CI so issues don't creep back in.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions