Skip to content

Mark get_log_level() pure for consistency and optimization #1347

@krystophny

Description

@krystophny

Rationale

  • get_log_level() only returns a module variable and has no side effects.
  • Marking it pure clarifies intent, enables compiler optimizations, and documents API guarantees.
  • Aligns with project Fortran guidelines: prefer purity; mark pure/elemental when applicable.

Scope

  • Update src/external/fortplot_logging.f90: declare get_log_level as pure.
  • No behavior change; existing tests cover correctness of returned level.

Risk

  • Very low. No I/O or global mutation in the function; signature remains the same.

Verification

  • Run make test and make test-ci; no regressions expected.

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