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

Use constants instead of #define for parameters #20

Closed
wants to merge 1 commit into from
Closed

Use constants instead of #define for parameters #20

wants to merge 1 commit into from

Conversation

dnrce
Copy link

@dnrce dnrce commented Sep 2, 2014

Avoids name conflicts.

@dnrce
Copy link
Author

dnrce commented Sep 2, 2014

I wasn't sure about preferred capitalization because the existing code seems inconsistent.

static const int Automatic = 1;
static const int Manual = 0;
static const int Direct = 0;
static const int Reverse = 1;
Copy link

Choose a reason for hiding this comment

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

It will properly be better to use uint8_t instead of int here. Also why not use enums instead? This would prevent people calling the functions with the wrong argument.

Copy link
Author

Choose a reason for hiding this comment

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

Because I have almost no idea what I'm doing with C++. 😄 Good suggestion -- I will explore it.

@dnrce
Copy link
Author

dnrce commented Sep 2, 2014

Closing to explore @Lauszus suggestion. I have screwed around with my forks so I will have to reopen a new PR with any changed commits.

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