Closed frederic-mahe closed 1 year ago
I love to read your code :-)
== is a string operator. It happens to work fine in this case, but I'd recommend to use the proper arithmetic operator -eq instead.
==
-eq
Also, why not?
contains_element "${guard}" "${unique_guards[@]}" && \ echo "Header guard '${guard}' is not unique!"
I did not test it, but the logic seems to be the same. If the function returns zero, echo message.
Hi @frederic-mahe, sorry, completely forgot about the PRs here... merged finally! Thank you a lot!
I love to read your code :-)
==
is a string operator. It happens to work fine in this case, but I'd recommend to use the proper arithmetic operator-eq
instead.Also, why not?
I did not test it, but the logic seems to be the same. If the function returns zero, echo message.