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

Update all strings to be stored in constants #16

Merged
merged 1 commit into from
Jul 11, 2022
Merged

Update all strings to be stored in constants #16

merged 1 commit into from
Jul 11, 2022

Conversation

iansan5653
Copy link

@iansan5653 iansan5653 commented Jun 28, 2022

Updates all string (char*) variables and arguments to use explicit constants (const char*). This is faster and more efficient and it avoids compiler warnings due to implicit conversions to/from constants (fixes #15).

In some cases, a variable was initialized and then conditionally modified. I updated these cases to check the condition at the time of assignment using a ternary expression so that unmodifiable constants can be used.

@valerionew
Copy link
Owner

valerionew commented Jun 29, 2022

Looks good, thanks. Did you manage to test it on the hardware?

@iansan5653
Copy link
Author

Hi @valerionew, sorry for the late reply - I was offline last week. I have tested this on hardware and it seems to be working great 👍

@valerionew valerionew merged commit f2c1d66 into valerionew:master Jul 11, 2022
This pull request was closed.
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.

Compiler warning: ISO C++ forbids converting a string constant to 'char*'
2 participants