Fix indent comment alignment rule 3#1372
Conversation
| if (next_nl == NULL || next_nl->nl_count > 1) | ||
| { | ||
| // FIXME: Max thresh magic number 5000 | ||
| return(5000); |
There was a problem hiding this comment.
I would use int and return -1 here to express an invalid value. Also, the name of the function could contain abs to clarify that.
There is no need to use size_t here.
There was a problem hiding this comment.
The int(-1) is also a magic number :). A std::optional should be used here, but this is a С++17. The magic number size_t(5000) is widely used in the options.cpp. It must be replaced everywhere with some constant, such as std::numeric_limits<size_t>::max().
There was a problem hiding this comment.
I agree with -1. I'm was just arguing against using size_t, and any other unsigned values, for anything other than sizes or bit-field operations. They introduce a lot of problems when used along with int due to implicit integer promotions.
|
Thanks for looking into this one. |
Also this fixes issue #1287.