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

refactor(operators): don't rely on operators extern var index #24

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

FranckG28
Copy link
Contributor

I've refactored operators.c to avoir using the extern var operators

  • it was an extern var, and his name can be confusing in a lot of file where we are also defining operators var. This refactor avoid the creation of any global vars.
  • operator detection was relying on the fact that the string in operators[] are in the same order as the operators enum. This can cause errors if we want to make changes to operators.
  • removed is_operator function since we can check if the get_operator_type return UNKNOWN instead.

Copy link
Member

@jvondermarck jvondermarck left a comment

Choose a reason for hiding this comment

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

Yessss that's a great observation ! Really good !

@jvondermarck jvondermarck merged commit 16af38e into master Dec 30, 2023
1 check passed
@jvondermarck jvondermarck deleted the fg/refactor/operators branch December 30, 2023 20:39
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.

2 participants