Skip to content

STL: Change macro constants to constexpr variables #270

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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