-
Notifications
You must be signed in to change notification settings - Fork 66
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
Remove unused temp variable #246
Remove unused temp variable #246
Conversation
Firmware for this pull request: |
src/Config.cpp
Outdated
uint16_t addreeprom = MEM_OFFSET_CONFIG; | ||
uint16_t length = MFeeprom.get_length(); | ||
configLength = 0; | ||
|
||
while (MFeeprom.read_byte(addreeprom++) != 0x00) { | ||
configLength++; | ||
if (addreeprom > length) // abort if EEPROM size will be exceeded | ||
if (addreeprom > length) // abort if EEPROM size will be exceeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment alignment. probably due to auto formatting rule.
This comment is also not necessary because it's obvious what is happening.
if length
was called eepromLength
it would be even more clear.
In general I propose to put comments above the line instead of behind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to remove the comment as part of this PR? I was only trying to remove the temp variable, I didn't bother touching anything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove it - thanks
Firmware for this pull request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not aware of the habit to have comments on end of line which makes our syntax formatter format this file every where. I don't like the long lines either, I will discuss it on #development
Fixes #245
Removes the unused
temp
variable. The variable was introduced here.