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

Cleanup: Switch evaluate_operator to constexpr inline instead of static where possible #1381

Merged
merged 4 commits into from
Feb 28, 2022

Conversation

yiwen-wong
Copy link

Make the compiler a little happier and stop generating unnecessary symbols.

@@ -20,13 +20,13 @@ namespace expressions
{

// == operator.
static inline bool evaluate_operator(common::gaia_id_t left, common::gaia_id_t right, operator_eq_t)
constexpr inline bool evaluate_operator(common::gaia_id_t left, common::gaia_id_t right, operator_eq_t)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd put inline before constexpr, because I feel that constexpr is a more essential part of the declaration, so we shouldn't insert "inline" in the middle of it.

Copy link
Contributor

@LaurentiuCristofor LaurentiuCristofor left a comment

Choose a reason for hiding this comment

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

Just a minor ordering suggestion.

Copy link
Contributor

@simone-gaia simone-gaia left a comment

Choose a reason for hiding this comment

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

LGTM

@yiwen-wong yiwen-wong merged commit 25b02fa into master Feb 28, 2022
@yiwen-wong yiwen-wong deleted the yiwen_static_to_constexpr branch February 28, 2022 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants