Skip to content

STL: Change macro constants to constexpr variables #270

@StephanTLavavej

Description

@StephanTLavavej

Older parts of our codebase contain many macro constants:

STL/stl/src/xtime.cpp

Lines 11 to 14 in 66b1e23

#define NSEC_PER_SEC 1000000000L
#define NSEC_PER_MSEC 1000000L
#define NSEC_PER_USEC 1000L
#define MSEC_PER_SEC 1000

We try to avoid macros when possible, so we use constexpr variables in new code. We should update the old code to be consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSomething can be improvedfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions