Skip to content

Replace macro usage for constants #2655

@Lestropie

Description

@Lestropie

Bears some relation to #2111, in that it might be nice to address old code structure as part of a general cleanup potentially in #2585.

Preprocessor macros are regularly used to define default values for parameters, often in cases where this value may be controllable at the command-line and it is desired for the default value to be printed as part of the help string for that option. However these are not properly context-bound, and in some instances I think I've found duplicate macros purporting to serve the same purpose but used in different places.

These days I try to use eg. a constexpr in the relevant namespace; eg. 7ae2f62. But it could be worthwhile to do an audit and clean up all residual lazy macro usage.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions