Closed Bradan closed 6 months ago
Thanks for the feedback, I'm working on it.
I've applied the changes and I hope everything is fine now. Do you have a style checker or formatter settings for CLion or other IDEs?
The conditional initial shift in front of the loop necessary because of the order we look at color (LSB/right side of the hex digits first), otherwise if bufSize was smaller than 8 we would have a problem. Sorry for the inconveniences with my initial commit.
I've applied the changes and I hope everything is fine now. Do you have a style checker or formatter settings for CLion or other IDEs? Sorry for the inconveniences with my initial commit.
I never setup a style checker. Others submitting code is rare and my editor's defaults does most of it for me. I am not super critical and let the small stuff through. Most important is good naming and readability of code. I tend to mention it more when there is other changes blocking the merge that need to be done.
Don't worry about cycling (submit, review, revisit, review, etc) with code reviews. No one is perfect and it's a way for growth and code improvement having two eyes/brains on the topic. I try not to take any comments personal, and I hope my comments don't come off as over critical. It's just how I was trained.
If I don't review or just plain reject is when I don't think there is merit to changes and I will usually comment as to why.
This area you spotted is ripe for improvement.
The method didn't work correctly as it decremented bufLen twice and forgot one digit. Besides this, it always returned 7 instead of the actual amount of characters used.
# + 123456 + null termination = 8 chars
You can try it on your desktop computer with that code and a C++ compiler:
Output: