Skip to content

Don't rely on the numeric order of enums #401

Description

@danth

What

As suggested at #392 (comment), comparing enums by their order is not ideal, because it could easily be broken when a new entry is added to the enum.

Acceptance Criteria (DoD)

  • No enum comparisons using < or >

How

Ideally, prefer using switch-case without a default. This produces a compiler warning if a particular value is not considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions