Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Expmap takes additional template parameter for clock type. #1636

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

KerstinKeller
Copy link
Contributor

This improves testability and allows to expire based on different time base, if required.

…s improves testability and allows to expire based on different time base, if required.
@KerstinKeller KerstinKeller added the cherry-pick-to-NONE Don't cherry-pick these changes label Jun 20, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

}

private:
static duration current_time;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'current_time' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

  static duration current_time;
                  ^

};

// Initialize the static member
TestingClock::duration TestingClock::current_time{ 0 };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'current_time' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

TestingClock::duration TestingClock::current_time{ 0 };
                                     ^

Copy link
Contributor

@rex-schilasky rex-schilasky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much easier to test !

@KerstinKeller KerstinKeller merged commit 3274646 into master Jun 21, 2024
21 of 22 checks passed
@KerstinKeller KerstinKeller deleted the feature/expmap-clock-template-param branch June 21, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-to-NONE Don't cherry-pick these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants