Skip to content

Use isValidIndex function internally in h3.c#1062

Merged
isaacbrodsky merged 1 commit intouber:masterfrom
ritoban23:use-isvalidindex-internally
Oct 14, 2025
Merged

Use isValidIndex function internally in h3.c#1062
isaacbrodsky merged 1 commit intouber:masterfrom
ritoban23:use-isvalidindex-internally

Conversation

@ritoban23
Copy link
Copy Markdown
Contributor

Use isValidIndex function internally #1060

This PR addresses issue #1060 by replacing manual validation checks with the unified isValidIndex function in the CLI application.

Changes

  • Updated 5 CLI subcommands to use H3_EXPORT(isValidIndex)(cell) instead of manual OR checks:
    • getResolution
    • getBaseCellNumber
    • getIndexDigit
    • isResClassIII
    • isPentagon

Testing

  • ✅ Project compiles successfully
  • ✅ All modified functions work with cells, directed edges, and vertices
  • ✅ Invalid inputs are properly rejected
  • ✅ 99% of existing tests pass (2 unrelated failures)

Files changed: src/apps/filters/h3.c

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Oct 14, 2025

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 98.936%. remained the same
when pulling d3c35b5 on ritoban23:use-isvalidindex-internally
into 1cbc65f on uber:master.

Copy link
Copy Markdown
Collaborator

@ajfriend ajfriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@isaacbrodsky isaacbrodsky merged commit fc2035d into uber:master Oct 14, 2025
45 checks passed
@ajfriend ajfriend added this to the v4.4 milestone Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants